IGCSE ICT TERM 1 Test
IGCSE ICT TERM 1 Test
a) 1
b) 2
c) 3
d) 0
a) 1
b) 2
c) 3
d) 4
8. Which of the following lists is correct for the output of the given
code?
a) [1, 2, 3]
b) [1, 2, 3, 4]
c) [1, 2, 4]
d) [1, 2, 3, 4, 5]
9. What will be the output of the following code?
a) Yes
b) No
c) Error
d) None
1. Fill in the missing code to allow the user to input 5 numbers, store
them in a list, and then print each number multiplied by 2:
2. Complete the code to calculate and print the sum of all even
numbers in a list:
3. Fill in the code to allow the user to input 3 names, store them in a
list, and check if a particular name exists in the list:
4. Complete the following code to find the largest number in the list
using a loop:
Section D: Theory Questions (3 x 3 = 9 Marks)
1. Explain the difference between a for loop and a while loop in Python.
When would you choose one over the other? Provide examples for both
types of loops.
2. Describe how if, else, and elif statements are used in Python for
decision-making. How does the control flow work when multiple
conditions are involved? Illustrate with an example.
3. What are lists in Python, and what are some of the common
operations that can be performed on them (e.g., appending, insert,
remove, pop, index)?