Beginning in CS
Numbers, Calculations, Data
Symbols
Decisions & Loops
100

What type of data is designed to hold words, letters, and characters?

str() 

100

Consider the following code:

print("2" + "3")

What is output?

23

100

What symbol is used to test if two values are equal?

==

100

What do we use when we want to create a 2nd option for an if statement?

elif

200

What type of data holds decimal numbers?

float()

200

Which of the following numbers might this code generate?

random.randint(8,16)

5

9

17

8.5

9

200

What symbol is used to declare a comment?

#

200

When we have used if and elif, what do we use to catch all other possible inputs?

else

300

What type of data holds whole numbers?

int()

300

What is the output?

print(17 % 5) 

2

300

What symbol is used for modular division?

%

300

Which boolean requires only one argument to be true to evaluate to true?

or

400

Give one example of an input device.

mouse, keyboard, camera, etc.

400

What is missing in this code?

x = 7 

print("The number is: " + x * 4) 

str(x*4)

400

What symbol is used to test if two values are NOT equal?

!=

400

Which boolean requires both arguments to be true to evaluate to true?

and

500

Which of the following is a NOT legal variable name?

num3

varTwo

1var

client_age

1var

500

What is the output?

print(4 % 10) 

4

500

What symbol is used to denote an exponent?

**

500

Write the range function that will print all even numbers between 10 and 46.

range(10,47,2)