Data Types Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is an Integer?

A

A Whole Number, e.g. 6

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

What is A Boolean?

A

A data type which is used for binary variables that can have one of two possible values, 0 (false) or 1 (true)

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

What is a Float?

A

A data type used for used for floating-point numbers which means they have a number that has a decimal place, e.g. 6.5

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

What is a String?

A

A data type used for data values that are made up of ordered sequences of characters, e.g. Hello

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

How would you make a 4.3 float to an integer?

A

int(4.3)

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

How would you make a 5 integer into a float?

A

float(5)

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