Programming Concepts Notes for Form 1 2025
Programming Concepts Notes for Form 1 2025
1. Control Structures
• Types of Loops:
▪ Example:
for i in range(5): print(i)
▪ Example:
while count < 5: count += 1
cpp
CopyEdit
do {
// code
} while (condition);
b. Selection
• Types:
▪ if mark >= 75: print("Distinction") elif mark >= 50: print("Pass") else:
print("Fail")
2. Functions
• Function Parts:
• Example (Python):
python
CopyEdit
return a + b
result = add(3, 4)
• Types of Functions:
a. Testing
• Types of Testing:
o Normal input
b. Debugging
• Types of Errors:
• Debugging Techniques: