TURNING POINT SCHOOLS, AUCHI.
NAME SESSION 2024/2025
SUBJECT COMPUTER PROGRAMMING (PYTHON) TIME 1 hr. 30 mins
CLASS JSS1 TERM Second
SECTION A: OBJECTIVES
1. What is the output of : c) To execute a block of code only if a
print(2 + 3 * 4)? condition is true
a) 20 d) To handle errors
b) 14
c) 12 8. What does the % operator do?
d) 9 a) Division
b) Multiplication
2. Which of the following is NOT a valid c) Modulo (remainder)
variable name in Python? d) Exponentiation
a) print
9. Which keyword is used for the "else
b) number
c) name if" condition in Python?
d) myvariable a) elseif
b) else if
3. What data type is True in Python? c) elif
a) integer d) else
b) string
c) boolean 10. What is the output of:
d) float print(5 == 5)?
a) True
4. What is the output of b) False
print(5 ** 2)? c) 5
a) 25 d) Error
b) 2
c) 3 11. Which symbol represents the "not
d) 2.0 equal to" operator in Python?
a) ==
5. Which operator is used for b) !=
exponentiation in Python? c) <>
a) * d) =!
b) /
c) ** 12. What is the purpose of elif in an
d) % if-else statement?
a) To check multiple conditions
6. What is the output of
b) To execute code if the if condition is
print(10 ** 3)?
false
a) 10 c) To repeat a block of code
b) 100 d) To define a function
c) 1000
d) Error 13. Which of the following is used for
single-line comments in Python?
7. What is the purpose of the if a) //
statement? b) /* */
a) To repeat a block of code c) #
b) To define a function d) --
14. What is the output of : 18. What is the name of this data
print(3 > 5)? type : pi = 3.14?
a) True a) int
b) False b) str
c) 3 c) float
d) 5 d) boolean
15. What is the output of:
19. What is the name of this data
print(25 == 5 * 2)?
type:
a) false
student = input(’Enter your
b) 25
name’)?
c) true
d) 10 a) int
b) boolean
c) string
16. What is the output of: d) dict
print(type(5.343455))?
a) float 20. What is the name of this data type:
b) set number =([1, 2, 3])?
c) list a) array
d) int b) set
c) boolean
d) dict
17. What is the output of:
print(25 + 4 / 2)?
a) 24
b) 25
c) 26
d) 27
SECTION B: THEORY
Answer ALL Questions from this section
1. (a) What is an algorithm?
(b) Write a python program to check if a number is positive or negative.
(10 marks)
2. (a) What is the difference between an operator and an operand?
(b) Write a program to check if a number is odd or even. (10 marks)
3. (a) What is a Pseudo-code?
(b) Write a program to check what time of the day it is by greeting “Good morning,
Good Afternoon, Good evening and Goodnight” (10 marks)
4. (a) What is a Conditional Statement?
(b) Write a program that grades students A,B,C,D,E or F depending on their score in a
subject. (10 marks)