No student devices needed. Know more
20 questions
A set of precise instructions that is meant to solve a problem is .......................
a computer
an algorithm
a program
an interpreter
What symbol is used in python to assign values to a variable?
plus +
forward slash /
equals =
asterisk *
Read the Python program:
When this program is executed, what will be displayed on the screen?
Note: There may be errors in the program and/or it may not behave as expected.
"I live in", location
"I live in", "Leeds"
I live in location
I live in Leeds
Read the Python program:
When this program is executed, what will be displayed on the screen, as a result of executing line 3?
Note: There may be errors in the program and/or it may not behave as expected.
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.
Which feature of programming involves a decision, but does not involve repeats?
Sequence
Selection
Iteration
Read the Python program below:
1. answer = 3 + 13 * 3
2. print("The Answer is", answer)
When this program is executed, what will be displayed on the screen?
Note: There may be errors in the program and/or it may not behave as expected.
The Answer is 3 + 13 * 3
The Answer is 42
The Answer is 48
The Answer is answer
The code you use to receive an input from the keyboard
enter()
receive()
add()
input()
Read the Python program:
When this program is executed, what will be displayed on the screen if the user enters 0 at the prompt?
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.
What is the word (command) used to display numbers and text on the screen?
output
input
command
A WHILE loop is an example of which type of feature
Sequence
Selection
Iteration
Concatenation
Read the Python program:
When this program is executed, what will be displayed on the screen?
Note: There may be errors in the program and/or it may not behave as expected.
small
medium
medium large
large
To display the following on screen
Hello World!
the following command should be used:
print(Hello World!)
print("Hello World" + !)
print("Hello World!")
print"(Hello World!)"
If you receive a NameError (name is not defined) when you run your program it means....
A variable has been assigned before it has been referred to.
An incorrect name has been chosen.
A variable has been referred to before it has been assigned.
A language key word has been used.
What will be the output?
1. name = "Dave"
2. print (name)
"Dave"
name
(name)
Dave
Read the Python program:
When this program is executed, how many times will line 4 be executed?
Note: There may be errors in the program and/or it may not behave as expected.
Line 4 will be executed once.
Line 4 will be executed at least once.
Line 4 will be executed 1357 times.
Line 4 will be executed an infinite number of times (the while loop will never terminate).
Which line of code would create a variable called
my_message
and give it the value
"bye"?:
my_message = “bye”
“my_message” = bye
variable my_message = “bye”
my_message(“bye”)
What will the output be from the following code?
Print("Hello world!")
Hello world!
"Hello world"
NameError
Print(Hello world!)
Read the Python program:
How many times will line 3 be executed?
Note: There may be errors in the program and/or it may not behave as expected.
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)
Read the Python code:
Which code is missing from line 11 to ''raise the Boolean flag' and end the game?
guessed = True
guessed = False
guessed == True
guessed = "False"
What syntax would you use to create a name variable?
name=input{}
input=name
name=input()
name=INPUT
Explore all questions with a free account