Summative assessment – Introduction to Python programming – Y8 (1)
Summative assessment – Introduction to Python programming – Y8 (1)
Sequence
• I’ve never been to and whatever the user has typed at the keyboard
• I’ve never been to location
• I’ve never been to input()
• It is not possible to know the output without executing the program.
• The Answer is 3 + 13 * 3
• The Answer is 42
• The Answer is 48
• The Answer is answer
• 13 42
• 42 13
• ab
• There is an error in the program because variables a and b are not assigned values in
the right order.
• 13 42
• 42 13
• There is an error in the program because variables a and b are not assigned values in
the right order.
• There is an error in the program because when line 1 is executed, variables a and b have
not been assigned values.
• 13
• 42
• 13 42
• There is an error in the program because variable a cannot hold two values at the same
time.
• 13 42
• 13 13
• 42 13
• 42 42
• There is an error in the program because when line 4 is executed, variable b no longer
has a value.
• 13 14
• 13 a+1
• ab
• There is an error in the program because when line 3 is executed, variable a no longer
has a value.
• 13
• 14
• 13 14
• There is an error in the program because there are no values for variable a that could be
used in the equation in line 3.
• 14
• 43
• 14 43
• There is an error in the program because variable b cannot hold two values at the same
time.
• 13
• 26
• 13 26
• Line 3 will not be executed because there is an error in line 2: print cannot display
expressions such as 2*a.
Selection
• 0 is positive
0 is negative
• 0 is positive
• 0 is negative
• The program will not display anything because 0 is neither positive nor negative.
• 0 is zero
0 is non-zero
• 0 is zero
• 0 is non-zero
• There is a syntax error in the condition in line 3.
• There is an error in the program because when line 1 is executed, variable number has
not been assigned a value.
• Nothing will be displayed on the screen.
• 13
zero
• 13
zero
0
• small
• medium
• medium
large
• large
• small
• medium
• medium
large
• large
Iteration
• None (the condition in line 2 will be False the first time it is checked)
• 1
• 3
• 4
• Infinitely (the condition in line 2 will never become False)
• None (the condition in line 2 will be False the first time it is checked)
• 1
• 3
• 4
• Infinitely (the condition in line 2 will never become False)
• None (the condition in line 2 will be False the first time it is checked)
• 1
• 2
• 3
• Infinitely (the condition in line 2 will never become False)
• None (the condition in line 2 will be False the first time it is checked)
• 1
• 10
• It is impossible to determine in advance
• Infinitely (the condition in line 2 will never become False)
• 10
• 1
• It is impossible to determine in advance
• There is an error in the program, because line 5 should have been indented
• a computer
• an algorithm
• a program
• an interpreter
• a computer
• a program called ‘the Python translator’
• a program called ‘the Python interpreter’
• a program called ‘a development environment’
Resources are updated regularly — the latest version is available at: ncce.io/tcc.
This resource is licensed under the Open Government Licence, version 3. For more information on this licence, see
ncce.io/ogl.