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.
The 20 questions
-
Which Python symbol is used to start a single-line comment?
- --
- //
- /*
- #
-
What does the Python command print('Hello') do on screen?
- Deletes text
- Scans text
- Saves text
- Displays text
-
In Python, x = 5 and then x = x + 2. What is the value of x?
- 2
- 5
- 10
- 7
-
Which symbol is used to assign a value to a variable in Python?
- ==
- =
- ==>
- ::
-
What is a named memory location that stores a changing value?
- Constant
- Integer
- Variable
- Function
-
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):
-
Which Python keyword runs a code block only when a condition is met?
- while
- for
- if
- def
-
What does Python use to show which lines belong to a code block?
- Full stops
- Semicolons
- Parentheses
- Indentation
-
What is the output of print(2 + 3 * 2) in Python?
- 8
- 10
- 7
- 12
-
Which Python line assigns the text 'Maths' to a variable named subject?
- subject = 'Maths'
- print('Maths' = subject)
- Maths = subject
- subject == 'Maths'
-
What is ignored by the computer when running Python code?
- Comment
- Function
- Keyword
- Variable
-
What kind of error is caused by missing a closing bracket in Python?
- Value error
- Runtime error
- Syntax error
- Logic error
-
What does the statement x = x + 1 typically do inside a loop?
- Resets to zero
- Increments by one
- Decrements by one
- Multiplies by two
-
In Python, which word starts a function definition?
- make
- def
- function
- proc
-
Which data type is used in Python to store text?
- Float
- Integer
- String
- Boolean
-
What is the output of print(len('quiz')) in Python?
- 1
- 3
- 4
- 5
-
Why should programmers use meaningful variable names?
- To run faster
- To save memory
- For readability
- To stop bugs
-
What should you check first when an unexpected character error occurs?
- Hardware drivers
- Internet connection
- Monitor resolution
- Spelling and punctuation
-
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
-
What does the Python input() function return?
- Float
- Integer
- String
- Boolean
Related quizzes
- Solving problems with two or more programming languages Quiz · T2.1.1 · 20 questions
- Lists, tables and arrays Quiz · T2.2.1 · 20 questions
- Procedures and functions Quiz · T2.3.1 · 20 questions
- Designing and developing modular programs Quiz · T2.3.2 · 20 questions
- Computational abstractions of real-world systems Quiz · T1.1.1 · 20 questions
- AND, OR and NOT Quiz · T3.1.1 · 20 questions
- Hardware and software components Quiz · T4.1.1 · 20 questions
- Combining applications across devices Quiz · T5.1.1 · 20 questions
- Using technology safely, respectfully and responsibly Quiz · T6.1.1 · 20 questions
- Sorting algorithms Quiz · T1.2.1 · 20 questions