placeholder image to represent content

Comparator Operators and Variables

Quiz by Paul Cummins

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

Correct quiz answers unlock more play!

New Quizalize solo game modes
20 questions
Show answers
  • Q1
    What is the output of the expression 5 > 3 in Python?
    True
    5
    3
    False
    30s
  • Q2
    What will the expression 7 == 7 evaluate to in Python?
    7
    True
    0
    False
    30s
  • Q3
    What is the result of the expression 10 <= 5 in Python?
    5
    True
    False
    10
    30s
  • Q4
    What does the expression 4 != 4 return in Python?
    True
    False
    Error
    4
    30s
  • Q5
    What will the expression 12 >= 15 evaluate to in Python?
    True
    15
    12
    False
    30s
  • Q6
    What is the output of the expression 8 < 10 in Python?
    8
    True
    10
    False
    30s
  • Q7
    What is the result of the expression 15 == 20 in Python?
    15
    True
    20
    False
    30s
  • Q8
    What will the expression 3 <= 3 return in Python?
    3
    False
    Error
    True
    30s
  • Q9
    What is the output of the expression 9 > 12 in Python?
    True
    9
    False
    12
    30s
  • Q10
    What does the expression 25 != 30 evaluate to in Python?
    False
    25
    True
    30
    30s
  • Q11
    What is the correct way to define a variable in Python?
    my-variable = 10
    10 = my_variable
    my variable: 10
    my_variable = 10
    30s
  • Q12
    Which of the following is a valid variable name in Python?
    1_variable
    variable_1
    variable@1
    variable-1
    30s
  • Q13
    What will the following code output? x = 5; print(x + 3)
    8
    3
    53
    5
    30s
  • Q14
    What is the purpose of the '==' operator in Python?
    To assign a value to a variable
    To add two values
    To compare two values for equality
    To concatenate strings
    30s
  • Q15
    What will happen if you try to assign a value to a variable using a reserved keyword in Python?
    The variable will be created successfully
    It will create a global variable
    An error will occur
    The value will be ignored
    30s

Teachers give this quiz to your class