True or False: A statement is a programming instruction
True
20.7 is what data type: integer, float, string
float
True or False: 8 < 3 or 20 > 9
True
If x is 15, what will happen with this code?
if x > 20:
print("dog")
elif x > 10:
print("monkey")
else:
print("cat")
print monkey
This python keyword displays or shows something on the screen
Which of the following can be used as a variable name: 4variable, dog&cat, my_ANIMAL, or print.
my_ANIMAL
What could x be if x > 20 and x < 29
21 through 28
What will happen with this code if score is 540
if score >= 900:
print("Impressive")
elif score >= 700:
print("Great")
elif score >= 500:
print("Good")
else:
print("Better luck next time")
print Good
Which python keyword lets us get information from the user
input
What number do we start counting from for python indexes? (To get a character from a string by its position)
0
What does != mean
not equal
What is wrong with the following code (2 things):
if name == Riley:
print("Teacher")
else
print("Student")
missing quotes around Riley and missing : after else
This symbol starts a comment and will not run in python
#
What are the 3 things that can be used in a python variable name?
Letters, numbers, underscores _
Fix this code: print(50=50)
print(50==50)
What is the code that matches this pseudocode?
START
ASK user if it is raining
IF it is raining (user answer is yes) THEN
PRINT bring an umbrella
ELSE
PRINT it is not raining
ENDIF
END
rain = input("Is it raining")
if rain == "yes":
print("Bring an umbrella")
else:
print("it is not raining")