Exam Revision Guide
Exam Revision Guide
Programming
Example in Python:
x = 10
y=5
if x > 5 and y < 10: # Both conditions must be true
print("Both conditions are true")
elif x > 5 or y > 10: # At least one condition must be true
print("One condition is true")
else:
print("Conditions are false")
4. Iteration (Loops)
Example:
# For loop
for i in range(5): # Runs 5 times
print("Hello")
# While loop
count = 3
while count > 0:
print(count)
count -= 1
5. Pre-defined Subroutines
Example:
numbers = [1, 2, 3]
print("Max value:", max(numbers))
6. Arrays
Example:
fruits = ["apple", "banana", "cherry"]
print(fruits[0]) # Outputs: apple
Spreadsheet
1. Conditional Formatting
Computer Systems
1. Binary to Denary
2. Denary to Binary
Answer: 1010