placeholder image to represent content

Basic Python programming

Quiz by Natalie Fenn

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
    What is the correct syntax to print 'Hello, World!' in Python?
    display('Hello, World!')
    console.log('Hello, World!')
    output('Hello, World!')
    print('Hello, World!')
    30s
  • Q2
    What is the correct way to write a comment in Python?
    // This is a comment
    /* This is a comment */
    # This is a comment
    <!-- This is a comment -->
    30s
  • Q3
    What is the result of 9 / 2 in Python?
    4.5
    2.25
    4
    5
    30s
  • Q4
    What is the correct way to declare a variable in Python?
    create x = 5
    x : 5
    x = 5
    int x = 5
    30s
  • Q5
    What is the correct syntax for a while loop in Python?
    if condition:
    while condition:
    do-while condition:
    for i in range(10):
    30s
  • Q6
    What is the output of the following Python code?x = 'Hello'y = 'World!'result = x + ' ' + yprint(result)
    World!
    Hello
    Hello World!
    HelloWorld!
    30s
  • Q7
    What is the correct syntax to print the value of a variable in Python?
    print(variable)
    print value_of_variable
    printVariable()
    print(variable_name)
    printVariable(value)
    30s
  • Q8
    Which of the following is not a data type in Python?
    float
    function
    string
    integer
    30s
  • Q9
    What does the 'print' function in Python do?
    Displays output on the console
    Creates a loop
    Defines a variable
    Performs mathematical operations
    30s

Teachers give this quiz to your class