Lesson T2.1.2

T2.1.2 Textual programming languages Quiz: KS3 Computing, Unit 2

20 questions

In partnership with Revision Ninja

Lesson T2.1.2, Textual programming languages: 20 multiple choice questions for the KS3 Computing (National Curriculum), Unit 2: Programming, written with Revision Ninja.

Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.

Host this setFree Play

The 20 questions

  1. Which Python symbol is used to start a single-line comment?

    • --
    • //
    • /*
    • #
  2. What does the Python command print('Hello') do on screen?

    • Deletes text
    • Scans text
    • Saves text
    • Displays text
  3. In Python, x = 5 and then x = x + 2. What is the value of x?

    • 2
    • 5
    • 10
    • 7
  4. Which symbol is used to assign a value to a variable in Python?

    • ==
    • =
    • ==>
    • ::
  5. What is a named memory location that stores a changing value?

    • Constant
    • Integer
    • Variable
    • Function
  6. Which Python command repeats a block of code exactly three times?

    • while i < 3:
    • repeat 3 times:
    • for i in range(4):
    • for i in range(3):
  7. Which Python keyword runs a code block only when a condition is met?

    • while
    • for
    • if
    • def
  8. What does Python use to show which lines belong to a code block?

    • Full stops
    • Semicolons
    • Parentheses
    • Indentation
  9. What is the output of print(2 + 3 * 2) in Python?

    • 8
    • 10
    • 7
    • 12
  10. Which Python line assigns the text 'Maths' to a variable named subject?

    • subject = 'Maths'
    • print('Maths' = subject)
    • Maths = subject
    • subject == 'Maths'
  11. What is ignored by the computer when running Python code?

    • Comment
    • Function
    • Keyword
    • Variable
  12. What kind of error is caused by missing a closing bracket in Python?

    • Value error
    • Runtime error
    • Syntax error
    • Logic error
  13. What does the statement x = x + 1 typically do inside a loop?

    • Resets to zero
    • Increments by one
    • Decrements by one
    • Multiplies by two
  14. In Python, which word starts a function definition?

    • make
    • def
    • function
    • proc
  15. Which data type is used in Python to store text?

    • Float
    • Integer
    • String
    • Boolean
  16. What is the output of print(len('quiz')) in Python?

    • 1
    • 3
    • 4
    • 5
  17. Why should programmers use meaningful variable names?

    • To run faster
    • To save memory
    • For readability
    • To stop bugs
  18. What should you check first when an unexpected character error occurs?

    • Hardware drivers
    • Internet connection
    • Monitor resolution
    • Spelling and punctuation
  19. What are the only two values a Boolean data type can hold in Python?

    • True or False
    • Yes or No
    • On or Off
    • 1 or 0
  20. What does the Python input() function return?

    • Float
    • Integer
    • String
    • Boolean

All KS3 Computing quizzes