
Python Review
Quiz by Tziri Lamm
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
- Q1
Which code will not result in an error?
num = input("Choose a number: ")
print("Your new number is "+ str(num+10))
num = str(input("Choose a number: "))
print("Your new number is "+ str(num+10))
num = int(input("Choose a number: ")
print("Your new number is "+ str(num+10)
num = int(input("Choose a number: "))
print("Your new number is "+ str(num+10))
45s - Q2
Which code will not result in an error?
age = int(input("How old are you? "))
next = age+1
print (Next year you will be + str(next) + years old.)
age = int(input("How old are you? "))
next = age+1
print ("Next year you will be " str(next) " years old.")
age = int(input("How old are you? "))
next = age+1
print ("Next year you will be " + str(next) + " years old.")
age = int(input("How old are you? "))
next = age+1
print "Next year you will be " + str(next) + " years old."
45s - Q3
Which of the following is the correct way to get information from a user?
input("What is your name? ")
print (input("What is your name? ")
name = input("What is your name? ")
name = "What is your name? "
45s - Q4
Sort the variables by whether or not they are properly named.
Users sort answers between categoriesSorting45s - Q5
Identify the variable type in this line of code:
num = "7.5"
integer
float
string
45s - Q6
You want to ask a user for their top 3 vacation spots.
Which of these would be the correct way to do that?
place1 = print("Vacation spot 1: ")
place2 = print("Vacation spot 2: ")
place3 = print("Vacation spot 3: ")
place = input("Vacation spot 1: ")
place = input("Vacation spot 2: ")
place = input("Vacation spot 3: ")
place1 = input("Vacation spot 1: ")
place2 = input("Vacation spot 2: ")
place3 = input("Vacation spot 3: ")
input("Vacation spot 1: ")
input("Vacation spot 2: ")
input("Vacation spot 3: ")
45s - Q7
At which line in this code will there be an error:
num1 = int(input("Choose a number: "))
num2 = input("Choose another number: ")
average = (num1+num2)/2
print (average)
num2 = input("Choose another number: ")
print (average)
average = (num1+num2)/2
num1 = int(input("Choose a number: "))
45s