Font size
WorksheetsICT benchmarking test 1.2
Total questions: 56
Worksheet time: 42mins
name = 'Dave'
print (name)
name = 'Dave'
greeting = "Good morning" + name
print (greeting)
How do you insert COMMENTS in Python code?
/*This is a comment*/
//This is a comment
#This is a comment
In Python, 'Hello', is the same as "Hello"
True
False
What does the Input function Do?
outputs any sentence or word
Ask the user to insert asked Data
Defines what an integer or string or boolean or float
What is the output of Name = print('Dave")
dave
"Dave"
Syntax Error
Dave
What do we use to assign a value to a variable?
+
/
==
=
holds whole numbers
holds a decimal point in a number
What is the output?
True
False
condition1
condition2
This operator checks to see if one value is the same as the other value
==
!=
>
<
What would be outputted here?
it divides by 7!
it divides by 3!
It divides by 7.
It divides by 3.
What will be outputted?
number is bigger than 10
nothing
an error
NUMBER IS BIGGER THAN 10
If else statement
Outputs a message on the screen
Gets data from the user
A decision
A loop controlled by a decision
What is the output?
more than 7
more than 23
spam
7
Which is NOT a data type in Python?
integer
boolean
anchor
float
Which is correct?
A
B
What is the name of the variable in this program?
colour
input
" "
output of the following question is:
#program for text addition
# input() method
f_name= "hello"
l_name ="world"
print( f_name + l_name)
helloworld
hello world
error
f_name+l_name
In programming, what is iteration (loops)?
The repetition of steps within a program
The order in which instructions are carried out
A decision point in a program
Testing a program to make sure it works
What does the following code do? myAge = int (myAge)
Converts the var (variable) myAge to a string
Converts the var (variable) myAge to a integer
Converts the var (variable) myAge from a integer to a string
Converts the var (variable) myAge to if statement
Which two statements are used to implement iteration(loops)?
FOR loops are
loops which run an unknown number of times
loops which run for a specific number of times
the same as if statements
not part of programming
Which type of loop iterates until instructed otherwise?
FOR loop
WHILE loop
Which kind of loop would be used?
I need a program that will keep letting me add money to a piggy bank until I get to £100.
FOR Loop
WHILE Loop
Which kind of loop would be used?
I need a program that will keep letting me add a monthly payment for 12 months.
FOR Loop
WHILE Loop
Which kind of loop would be used?
I need a guessing game program that will let me keep guessing until I get the right answer.
FOR Loop
WHILE Loop
Which kind of loop would be used?
I need a revision program that will run through revision questions 4 times.
FOR Loop
WHILE Loop
word= "computer"
for num in range(1,6):
print(word)
for number in range(6):
print(number)
while password != "computer":
print("Enter Password: ")
password = input()
names = ["Paul","Phillip","Paula","Phillipa"]
In Python, what are if-statements used for?
Looping
Indexing
Decision Making
Testing
What is the output of the following code?
Time = "Day"
Sleepy = False
Pajamas = "Off"
if Time == "Night" and Sleepy == True:
Pajamas = "On"
print(Pajamas)
off
on
False
Day
Which of the following statements are correct?
(Select 2 Answers)
If is a conditional statement
If is used for looping
If is used for comparing and decision making
If is used for error handling
What will the be the output of the following code?
if (10<0) and (0 <-10):
print(“A”)
else:
print(“B”)
A
B
AB
BA
_____ data type contain integer values with no decimal such as 1, 200, 999 etc.
int
float
char
String
_____ data type contain integer values with decimal such as 10.1, 5555.0, 33.33 etc.
int
float
char
String
_____ data type contain a set of characters (text) or word such as Hello, Ali, Car Type etc.
int
float
char
String
Which if the values below is an integer data type?
1
1.0
1/2
"1"
Which if the values below is a float data type?
2
2.11
2/4
"2.11"
what is should be added to blanks in order to make the program function proberly
(a)
what should be in the first blank
(a)
what should be added to the blank
(a)
whats should be in the first blank
operation == "+"
operation == "-"
operation == +
operation == -
correct password == user password
correct_password == user_password
"correct password" == "user password"
'correct_password' == 'user_password'
what should be added to the third blank
Average
average
"Average"
"average"
