Data Types
Variables
Expressions
Variables and Expressions
100

The data type that represents whole numbers

Integer

100

The symbol used for variable assignment

=

100

Evaluate the expression: 11 + 3

14

100

x = 2

y = 5 + x

What value does y store?

7

200

"abc123" is an example of this data type

String

200

The correct way to declare a python variable called x storing a value of 5

x = 5
200

Evaluate the expression: "4" + "ever"

"4ever"

200

y = 12

x = 3

y = y * x

What does y store?

36

300

Data type that can have only one of two possible values.

Boolean

300

The reason y and Y would not be considered the same variable name

Variable names are case sensitive

300

Evaluate the expression: "1" + "1"

"11"

300

a = 17

b = 5

a = a + 1

b = a + 7

What do a and b store?

18 and 25

400

Write a line of code that casts the integer 5 into the string "5"

str(5)

400

1.  x = 5

2.  x = 3

What happens to the 5 when line 2 of the code executes?

It is thrown away.

400

Evaluate the expression: 5*2+1

11

400

zap = 7 * 3

zip = int(zap/5)

What does zip store?

4

500

Write a single line of code that accomplishes both of the following:

-Asks the user to input a number

-Converts that number from string to integer

int(input("Enter a number: ")

(or similar)

500

Variable names can contain these kinds of characters

alphanumeric and underscore (_)

500

num = int((3+8)/(5-2))

What value does num store?

3

500
yay = 7 + 8*4

wow = yay/3

yay = int(wow)

wow = 10/yay

What values do yay and wow store?

13 and 0

M
e
n
u