What type of data is designed to hold words, letters, and characters?
str()
Consider the following code:
print("2" + "3")
What is output?
23
What symbol is used to test if two values are equal?
==
What do we use when we want to create a 2nd option for an if statement?
elif
What type of data holds decimal numbers?
float()
Which of the following numbers might this code generate?
random.randint(8,16)
5
9
17
8.5
9
What symbol is used to declare a comment?
#
When we have used if and elif, what do we use to catch all other possible inputs?
else
What type of data holds whole numbers?
int()
What is the output?
print(17 % 5)
2
What symbol is used for modular division?
%
Which boolean requires only one argument to be true to evaluate to true?
or
Give one example of an input device.
mouse, keyboard, camera, etc.
What is missing in this code?
x = 7
print("The number is: " + x * 4)
str(x*4)
What symbol is used to test if two values are NOT equal?
!=
Which boolean requires both arguments to be true to evaluate to true?
and
Which of the following is a NOT legal variable name?
num3
varTwo
1var
client_age
1var
What is the output?
print(4 % 10)
4
What symbol is used to denote an exponent?
**
Write the range function that will print all even numbers between 10 and 46.
range(10,47,2)