Chapter 4 Flashcards

1
Q

Data is….

A

Information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Character

A

A single character

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

String

A

A list of characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A strongly typed language is….

A

You must STATE THE VARIABLE TYPE when creating a variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a weakly typed programming language.

A

The language guesses what data type should be used

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Counts how many characters eg. ***(orange) -> 6

A

Len(string)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

‘orange’.**() -> Orange

A

String.capitilize()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

‘BanAna’.*****() - banana

A

String.lower()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

‘Banana’.*****() - BANANA

A

String.upper()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Moves to the right eg. ‘Dog’.*****(50) - Dog

A

String.rjust(number)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

‘Dog’.****(‘o’,’i’) - dig

A

String.replace(oldvalue, newvalue))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Splits into list eg. ‘Myname’.*****(‘y’) - [‘my,’name’]

A

String.split(separator)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Remove characters from the beginning and the end of the string.

A

String.strip(chatacters)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Converts a list into string where each item in the list is joined by that string. Eg.

‘+’.**([‘Bill’,’Barney’,Ben’)] ——> Bill+Barney+Ben

A

String.join(list)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Locates the index position of the first character of the substring. Eg.

‘The missing word’.**(‘miss’) —> 4

A

String.find(substrings)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Changes items in a string eg.

“My name is {name} and I am {age} years old.”.****(name = Bob, age = ‘27’) —> My name is bob and I am 27 years old

A

String.format(items)

17
Q

Newline

A

\n

18
Q

Tab

A

\t

19
Q

\”

A

Print quote mark

20
Q

\\

A

Print backslash

21
Q

Concatenation is a fancy word for…

A

Combining strings and lists.

22
Q

Element

A

An item of data

23
Q

An array

A

A variable that contains many items of data

24
Q

A static array

A

Defined, unchangeable size

25
Q

Dynamic array

A

Size can change

26
Q

Record

A

A collection of data about a particular subject

27
Q

A database

A

A structured and managed set of data held on a computer

28
Q

Table

A

A sheet of data in a database

29
Q

Field

A

An item of information expressed as a column in a table

30
Q

Entry

A

A record of data elements expressed as rows of a table

31
Q

Cell

A

An Item of data in a table

32
Q

SQL - *

A

Wildcard selects all fields

33
Q

SQL layout

A

Select : the data you are interested in
From : the table you are interested in
Where : the condition you are interested in