
21-22 S3 UT Past paper
Authored by Hoi Lee Wong
Computers
9th - 12th Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The initial value of A and B are 9 and 3. After executing the following Python statements, what are the values of A and B?
C = A + B
A = C - A
B = C - A
3
3
3
9
6
9
9
3
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following expressions can generate an even random number from 16 to 30?
random.randint(16,30) + 2 * 8
random.randint (1,16) * 2 + 8
random.randint (0,7) + 16 * 2
random.randint (0,7) * 2 + 16
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the truth value for the following expression?
("APPLE" > "apple") or ("Boy">"B") and not("C">"c")
true
false
"A" or "B" and not "C"
no truth value
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many ‘#’ will be shown on the screen after executing the following program segment?
for i in range(-5,11):
print("#")
5
10
15
16
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the final value of n after executing the following program segment?
n=0
for i in range(1,6):
n=n + 3 * i
15
30
45
60
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output after the execution of the following program segment?
for x in range(8,1,-1):
if x%2==0:
print(x,end="")
print()
8765432
8642
2468
864
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If a is input as 60, what will be the output for the following program segment?
if a>50:
if a>80: print("P")
else: print("Q")
elif a<20: print("R")
else: print("S")
P
Q
R
S
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?