0% found this document useful (0 votes)
11 views20 pages

Year 8 Final Revision (Solved)

The document contains a series of questions and answers related to Python programming concepts for Year 8 students. Topics covered include functions, data types, operators, and logical statements. Each question is followed by multiple-choice answers, with the correct answer indicated.

Uploaded by

h38908293
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views20 pages

Year 8 Final Revision (Solved)

The document contains a series of questions and answers related to Python programming concepts for Year 8 students. Topics covered include functions, data types, operators, and logical statements. Each question is followed by multiple-choice answers, with the correct answer indicated.

Uploaded by

h38908293
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Nefertari International Schools

ICT Final Revision


Model Answer
2025
Trimester 3 – Year 8
Questions
1. What does the input() function do in Python?

• A. Outputs a message
• B. Pauses the program
• C. Receive user input
• D. Ends the program

Answer: C

2. What is the correct syntax to display a message on the screen?

• A. echo("Hello")
• B. say("Hello")
• C. print("Hello")
• D. output("Hello")

Answer: C

3. What happens when you use input("Enter your name: ")?

• A. It prints your name


• B. It closes the program
• C. It stores the name automatically
• D. It asks the user to enter their name
Answer: D
4. What is the output of print("Hello", "World")?

• A. HelloWorld
• B. Hello,World
• C. Hello World
• D. Error

Answer: C

5. Which function is used to display messages in Python?

• A. echo()
• B. print()
• C. say()
• D. message()

Answer: B

6. What is the data type of "Ali"?

• A. int
• B. float
• C. bool
• D. str
Answer: D

7. Which of the following is a boolean value?

• A. "True"
• B. true
• C. True
• D. yes
Answer: C

8. Which variable name is valid?


• A. 2name
• B. name_2
• C. name 2
• D. @name

Answer: B

9. What will type(1.55) return?

• A. int
• B. str
• C. float
• D. bool

Answer: C

10. What is stored in age = 13?

• A. A string
• B. A float
• C. An integer
• D. A boolean
Answer: C

11. Which of these is a string?

• A. '12'
• B. 12
• C. 12.0
• D. True
Answer: A

12. Python variable names are:

• A. Case sensitive
• B. Always uppercase
• C. Always lowercase
• D. Not sensitive to case
Answer: A

13. Which of the following is a float?

• A. 7
• B. 7.0
• C. "7.0"
• D. True
Answer: B

14. What does str(15) do?

• A. Converts 15 to a float
• B. Converts 15 to a string
• C. Makes 15 disappear
• D. None
Answer: B

15. What will int("10") + 5 return?

• A. 105
• B. "105"
• C. 15
• D. Error
Answer: C

16. What will str(10) + “5” return?

• A. 105
• B. “105”
• C. 15
• D. Error
Answer: B
17. Which converts a float to an integer?

• A. float()
• B. str()
• C. int()
• D. bool()

Answer: C

18. float(7) will return:

• A. 7
• B. "7.0"
• C. 7.0
• D. Error
Answer: C

19. What is the result of int(9.8)?

• A. 10
• B. 9.8
• C. 9
• D. Error
Answer: C

20. str(13) returns:

• A. 13
• B. "13"
• C. '13.0'
• D. None
Answer: B
21. What is the type of str(5.5)?

• A. float
• B. int
• C. bool
• D. str
Answer: D

22. Which line of code will cause an error?

• A. int("10")
• B. float("9.9")
• C. str(5)
• D. int("ten")
Answer: D

23. int("100") + float("1.5") equals:

• A. 101.5
• B. 101
• C. Error
• D. "101.5"
Answer: A

24. Which keyword is used to start a condition?

• A. while
• B. def
• C. if
• D. loop
Answer: C
25. Which symbol means "is equal to"?

• A. =
• B. ==
• C. !=
• D. =>
Answer: B

26. What does elif mean?

• A. Else-if
• B. End loop
• C. Else
• D. Error handler

Answer: A

27. What is the output for score = 95 in the given condition?

• A. Excellent!
• B. Good job!
• C. Keep practicing!
• D. Error

Answer: A

28. Which of these is a comparison operator?

• A. +
• B. =
• C. >=
• D. and

Answer: C
29. How do you define a function in Python?

• A. function greet():
• B. define greet():
• C. def greet():
• D. func greet():
Answer: C

30. What is the expected output if the user entered the value 77

• A. Even Number
• B. Odd Number
• C. Undefined
• D. Error

Answer: B

31. What is the function below output?

• A. Hi Ali
• B. Hello Ali
• C. Ali Hi
• D. greet Ali
Answer: A

32. What happens when you call a function?

• A. It is defined
• B. It executes the code inside
• C. It ends the program
• D. Nothing

Answer: B
33. How do you call a function named greet with input "Sara"?

• A. greet = Sara
• B. call greet(Sara)
• C. greet("Sara")
• D. run greet("Sara")
Answer: C

34. What does a function help us do?

• A. Store numbers
• B. Repeat code easily
• C. Compare values
• D. Make graphics
Answer: B

35. What does // mean in Python?

• A. Division
• B. Modulus
• C. Floor division
• D. Power
Answer: C

36. What is 10 // 3?

• A. 3.3
• B. 3
• C. 4
• D. 0
Answer: B
37. What is the output of 3 ** 3?

• A. 9
• B. 27
• C. 6
• D. 81

Answer: B

38. Which symbol is used for multiplication?

• A. x
• B. *
• C. X
• D. mult

Answer: B

39. a = 10 ; b = 3
print(a - b) gives:

• A. 7
• B. 13
• C. 30
• D. 3

Answer: A
40. What is the result of 5 * 4?

• A. 20
• B. 9
• C. 25
• D. 15

Answer: A

41. What is the result of 17 // 4 in Python?

• A. 4.25
• B. 4
• C. 5
• D. 4.0

Answer: B

42. What is a / b if a = 10 and b = 4?

• A. 2
• B. 2.5
• C. 2.0
• D. 2.25

Answer: B

43. Which operator is used for power (exponentiation)?

• A. ^
• B. **
• C. %
• D. ^^

Answer: B
44. What is the output of 5 > 10?

• A. True
• B. False
• C. 5
• D. Error

Answer: B

45. Which of the following is a logical operator?

• A. ==
• B. !=
• C. or
• D. //

Answer: C

46. x = 5 , y = 10; print(x < y and y > 5) outputs:

• A. True
• B. False
• C. Error
• D. None

Answer: A
47. What is the result of 10 != 5?

• A. False
• B. Error
• C. True
• D. 0

Answer: C

48. What does the and operator do?

• A. Returns True if any are True


• B. Returns True if all are True
• C. Negates condition
• D. Divides two values

Answer: B

49. What does the or operator do?

• A. Returns True if at least one is True


• B. Returns True only if all are True
• C. Returns False if any is True
• D. Negates all values

Answer: A
50. not True returns:

• A. Error
• B. 1
• C. False
• D. True

Answer: C

51. Which statement is False for logic gates?

• A. AND gate returns True if both inputs are True


• B. OR gate returns False if all inputs are False
• C. NOT gate has two inputs
• D. Logic gates use True/False values

Answer: C

52. Which is a Boolean value?

• A. "True"
• B. TRUE
• C. 1
• D. True

Answer: D

53. What is the data type of the variable x where x = False?

• A. str
• B. float
• C. int
• D. bool

Answer: D
54. Which of the following is used to take input from the user?

• A. get()
• B. input()
• C. read()
• D. enter()

Answer: B

55. What is the result of print("3" + "4")?

• A. 7
• B. 34
• C. Error
• D. None

Answer: B

56. Which of these is the correct syntax for a function in Python?

• A. define myFunc():
• B. func myFunc():
• C. def myFunc():
• D. function myFunc():

Answer: C

57. What is the output of print(4 * 2)?

• A. 6
• B. 8
• C. 10
• D. 42

Answer: B
58. How do you check if two values are equal in Python?

• A. =
• B. !=
• C. ==
• D. equal

Answer: C

59. What does the // operator do?

• A. Normal division
• B. Gives the remainder
• C. Floor division
• D. Power

Answer: C

60. Which of these keywords is used for an alternative condition?

• A. elseif
• B. else if
• C. elif
• D. then

Answer: C

61. Which of the following is a logic gate?

• A. AND
• B. LOOP
• C. DEF
• D. PRINT

Answer: A
62. What is the output of NOT gate if the input is True?

• A. True
• B. False
• C. 1
• D. Error

Answer: B

63. Which logic gate outputs True only if both inputs are True?

• A. OR
• B. NOT
• C. AND
• D. XOR

Answer: C

64. In which situation will an OR gate return False?

• A. One input True


• B. Both inputs True
• C. One input False
• D. Both inputs False

Answer: D

65. Which of the following is an arithmetic operator?

• A. and
• B. *
• C. or
• D. not

Answer: B
66. Python is case-sensitive.

• A. True
• B. False

Answer: A

67. What is the output of print(2**4)?

• A. 6
• B. 8
• C. 16
• D. 14

Answer: C

68. What will print("Hello" * 3) output?

• A. HelloHelloHello
• B. Error
• C. 3Hello
• D. Hello 3

Answer: A

69. To convert a string '25' into an integer, which function is used?

• A. str()
• B. float()
• C. int()
• D. bool()

Answer: C
70. What will be the output of the following code?

• A. True
• B. False
• C. Error
• D. Nothing is printed

Answer: A

You might also like