placeholder image to represent content

Basic Print Statements

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
9 questions
Show answers
  • Q1
    What does the print statement do in Python?
    It outputs text or variables to the console.
    It creates a new variable.
    It closes the Python program.
    It saves data to a file.
    30s
  • Q2
    Which of the following is the correct syntax to use the print statement in Python?
    print('Hello, World!)
    print('Hello, World!')
    print[Hello, World!]
    30s
  • Q3
    What will the following code output? print('Python is fun!')
    Python is not fun!
    No output
    Syntax Error
    Python is fun!
    30s
  • Q4
    What will happen if you forget the parentheses in a print statement, like this: print 'Hello'?
    It will print 'Hello' normally.
    It will create a new variable.
    It will print nothing.
    It will raise a SyntaxError.
    30s
  • Q5
    In Python, how can you print multiple items in one print statement?
    By using plus signs to concatenate them.
    By placing items in square brackets.
    By using semicolons to separate them.
    By separating the items with commas.
    30s
  • Q6
    What will the following code print? print('The answer is', 42)
    42
    The answer is
    The answer is 42!
    The answer is 42
    30s
  • Q7
    What is the correct way to include a string and a variable inside the print statement?
    print('My age is' age)
    print('My age is' + age)
    print('My age is', age)
    print('My age is: age')
    30s
  • Q8
    Which of the following is NOT a valid syntax for a print statement in Python?
    print('Hello, World!')
    print 'Hello'
    print('Hello', 5)
    print('Hello')
    30s
  • Q9
    What will be the output of the following code? print('2 + 2 =', 2 + 2)
    2 + 2 = 2
    2 + 2 = 22
    2 + 2 = 4
    2 + 2 = 2 + 2
    30s

Teachers give this quiz to your class