WorksheetsYear 10 Revision Quiz
Total questions: 35
Worksheet time: 22mins
Name
Class
Date
1.
LENGTH("password") will return...
a)
8
b)
7
c)
9
d)
11
2.
RIGHT("Hello world!", 6) will return...
a)
world!
b)
World!
c)
Hello
d)
world
3.
how we store string value in variable?
a)
'string'
b)
"string"
c)
%string%
d)
#sring#
4.
For string symbol + means........................
a)
addition
b)
swapp
c)
concatenation
d)
multiplication
5.
str1='101'
x=int(str1)
z=x+400
print(z)
a)
101400
b)
x400
c)
501
d)
none of above
6.
fruit1="kiwi"
fruit2="strawberry"
print(len(fruit1))
print(len(fruit2))
a)
kiwi and strawberry
b)
4
10
c)
4 10
d)
410
7.
<=
a)
less than
b)
less than or equal to
8.
>=
a)
greater than
b)
greater than or equal to
c)
not greater than
d)
not equal to
9.
==
a)
equal to
b)
assign a variable
c)
not equal to
d)
less than
10.
! =
a)
greater than variable
b)
less than variable
c)
equal to
d)
not equal to
11.
3<=4
a)
TRUE
b)
FALSE
12.
2 = = 3
a)
TRUE
b)
FALSE
13.
If p=25 , what is p**2?
a)
50
b)
125
c)
600
d)
625
14.
c=35 if 34<43 else 43
a)
34
b)
43
c)
35
d)
1
15.
What is the result?
number_of_coins = 10 .
if number_of_coins == 6: .
. print("You can buy some gum")
else: .
if number_of_coins == 10:
. print("You are rich")
else: .
. print("Get a job!")
number_of_coins = 10 .
if number_of_coins == 6: .
. print("You can buy some gum")
else: .
if number_of_coins == 10:
. print("You are rich")
else: .
. print("Get a job!")
a)
You can buy some gum
b)
You are rich
c)
Get a job!
d)
You are rich
Get a job!
Get a job!
16.
What is the result?
number_of_coins = 6 .
if number_of_coins == 6: .
. print("You can buy some gum")
else: .
if number_of_coins == 10:
. print("You are rich")
else: .
. print("Get a job!")
number_of_coins = 6 .
if number_of_coins == 6: .
. print("You can buy some gum")
else: .
if number_of_coins == 10:
. print("You are rich")
else: .
. print("Get a job!")
a)
You can buy some gum
b)
You are rich
c)
Get a job!
d)
You are rich
Get a job!
Get a job!
17.
What is the result?
number_of_coins = 1 .
if number_of_coins == 6: .
. print("You can buy some gum")
else: .
if number_of_coins == 10:
. print("You are rich")
else: .
. print("Get a job!")
number_of_coins = 1 .
if number_of_coins == 6: .
. print("You can buy some gum")
else: .
if number_of_coins == 10:
. print("You are rich")
else: .
. print("Get a job!")
a)
You can buy some gum
b)
You are rich
c)
Get a job!
d)
You are rich
Get a job!
Get a job!
18.
What is the result?
number_of_coins = 1 .
if number_of_coins < 6: .
. print("You can buy some gum")
else: .
if number_of_coins == 10:
. print("You are rich")
else: .
. print("Get a job!")
number_of_coins = 1 .
if number_of_coins < 6: .
. print("You can buy some gum")
else: .
if number_of_coins == 10:
. print("You are rich")
else: .
. print("Get a job!")
a)
You can buy some gum
b)
You are rich
c)
Get a job!
d)
You are rich
Get a job!
Get a job!
19.
What is the result?
number_of_coins = 7 .
if number_of_coins > 6: .
. print("You can buy some gum")
else: .
if number_of_coins < 10:
. print("You are rich")
else: .
. print("Get a job!")
number_of_coins = 7 .
if number_of_coins > 6: .
. print("You can buy some gum")
else: .
if number_of_coins < 10:
. print("You are rich")
else: .
. print("Get a job!")
a)
You can buy some gum
b)
You are rich
c)
Get a job!
d)
You are rich
Get a job!
Get a job!
20.
What is the result?
number_of_coins = 6 .
if number_of_coins > 6: .
. print("You can buy some gum")
else: .
if number_of_coins < 10:
. print("You are rich")
else: .
. print("Get a job!")
number_of_coins = 6 .
if number_of_coins > 6: .
. print("You can buy some gum")
else: .
if number_of_coins < 10:
. print("You are rich")
else: .
. print("Get a job!")
a)
You can buy some gum
b)
You are rich
c)
Get a job!
d)
You are rich
Get a job!
Get a job!
21.
What is the result?
number_of_coins = 3 .
if number_of_coins > 6: .
. print("You can buy some gum")
else: .
if number_of_coins < 10:
. print("You are rich")
else: .
. print("Get a job!")
number_of_coins = 3 .
if number_of_coins > 6: .
. print("You can buy some gum")
else: .
if number_of_coins < 10:
. print("You are rich")
else: .
. print("Get a job!")
a)
You can buy some gum
b)
You are rich
c)
Get a job!
d)
You are rich
Get a job!
Get a job!
22.
In programming, what is iteration?
a)
The repetition of steps within a program
b)
The order in which instructions are carried out
c)
A decision point in a program
d)
Testing a program to make sure it works
23.
Why is iteration important?
a)
It determines the order in which instructions are carried out
b)
It allows code to be simplified by removing duplicated steps
c)
It allows multiple paths through a program
d)
It ensures the code works correctly
24.
Which two statements are used to implement iteration?
a)
IF and WHILE
b)
ELSE and WHILE
c)
FOR and WHILE
d)
IF and ELSE
25.
The condition for a while loop to continue could include which of the following?
a)
While something equals something
b)
While something is greater than something
c)
While something is True
d)
All of these
26.
Which of the following symbols is used in Python to mean "Equal to"?
a)
=
b)
!=
c)
==
d)
>=
27.
Which of the following symbols is used in Python to mean "Not equal to"?
a)
==
b)
!=
c)
<>
d)
><
28.
Which of the following symbols is used in Python to mean "Greater than or equal to"?
a)
<=
b)
>>
c)
>=
d)
=>
29.
What is this symbol used for in a flowchart?
a)
A decision/question
b)
A task to carry out
30.
What symbol do flowcharts begin with?
a)
oval
b)
parallelogram
c)
rectangle
d)
diamond
31.
What does this shape represent?
a)
Input/Output
b)
Decision
c)
Process
d)
Start/Stop
32.
What's missing from this part of a flowchart?
a)
An Arrow
b)
A Line
c)
A Square
d)
A Diamond
33.
What is the Output if the user enters:
Yes
Yes
a)
Leave umbrella at home
b)
Take an umbrella
34.
What is the Output if the temperature is:
19
19
a)
Below Freezing
b)
Above Freezing
35.
What will happen if the user's book return is late?
a)
Sends them an SMS (text)
b)
Does not send them an SMS (text)
100 %
