placeholder image to represent content

Python Review

Quiz by Tziri Lamm

Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

New Quizalize solo game modes
7 questions
Show answers
  • 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 categories
    Sorting
    45s
  • 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

Teachers give this quiz to your class