placeholder image to represent content

Python: Input

Quiz by Ayesha Abdullah

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

Correct quiz answers unlock more play!

New Quizalize solo game modes
9 questions
Show answers
  • Q1

    In the following code, what is happening?

    foo = "bar"

    A variable named foo is being created, with a value of "bar"

    A variable named bar is being created, with a value of "foo"

    30s
  • Q2

    What is an Input?

    Displays on screen

    A routine

    A function that allows us to ask the user to enter some data

    To plug something

    30s
  • Q3

    In the following code, what type of variable is being created?

    foo = 3.5

    Boolean

    Float

    Integer

    String

    30s
  • Q4

    What will be the output?

    name = "Dave"

    print (name)

    name

    (name)

    "Dave"

    Dave

    30s
  • Q5

    In the following code, what type of variable is being created?

    foo = "3"

    Boolean

    String

    Float

    Integer

    30s
  • Q6

    The correct way to convert user input is:

    birth_year = (input(int))

    birth_year = number(input())

    birth_year = int(input())

    30s
  • Q7

     In the following code, what value will be assigned to the variable "cat"?

    mouse, cat, dog = "small", "medium", "large"

    medium

    small

    large

    small, medium, large

    30s
  • Q8

    You assign a value to a variable with which symbol

    @

    =

    -

    +

    30s
  • Q9

    If the coding steps are in the incorrect order, the computer can still execute the program.

    False

    True

    30s

Teachers give this quiz to your class