placeholder image to represent content

Unit 1 Python - Part 2

Quiz by Jennifer Whiteaker

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 does the 'and' logical operator do?

    Combines two statements that have opposite truth values

    Return True if at least one of the statements is true

    Combines two statements that are both false

    Combines two statements that are both true

    30s
  • Q2

    What does the 'or' logical operator do?

    Combines two statements that are both false

    Combines two statements that are both true

    Combines two statements that have opposite truth values

    Returns True if at least one of the statements is true

    30s
  • Q3

    Does the following code return True or False?

    3 != 4

    Integer

    True

    False

    Boolean

    30s
  • Q4

    Which comparison operator is used to check if two values are not equal?

    ==

    >

    !=

    <=

    30s
  • Q5

    Which comparison operator is used to check if one value is greater than or equal to another value?

    <=

    >=

    ==

    <>=

    30s
  • Q6

    Which comparison operator is used to check if one value is less than another value?

    <=

    <

    >

    <>

    30s
  • Q7

    What is the difference between the == and = operators in Python?

    == is never correct to use.

    == is used for comparison and = is used for assignment

    No difference. They mean the same thing.

    = is used for comparison and == is used for assignment

    30s
  • Q8

    camelCase and snake_case are the two naming conventions we use in Python to name variables

    True

    False

    30s
  • Q9

    A variable name can contain spaces

    True

    False

    30s
  • Q10

    A variable name can contain a symbol

    True

    False

    30s
  • Q11

    A variable name cannot start with a number

    True

    False

    30s
  • Q12

    age and AGE are the same variable

    False

    True

    30s
  • Q13
    What is the correct syntax to create a variable named 'age' and assign it the value 18 in Python?
    age = 18
    18 = age
    age == 18
    variable age = 18
    30s
  • Q14

    What is the output of the following code?

    num = 6

    if num > 6

       print ("Greater than 6")

    else:

       print ("Not greater than 6")

    Error

    Nothing will print

    Not greater than 6

    Greater than 6

    30s
  • Q15

    What is the output of the following code?

    name = "Joe"

    print  name * 2

    JoeJoe

    Error

    Nothing will print

    Joe

    30s

Teachers give this quiz to your class