Alright, let’s do loops — this one comes up a lot in BECE ICT 👇 --- Sample BECE Programming Question: Loops Q2. A teacher wants a program that prints the numbers 1 to 5 on the screen. Write the program using pseudocode with a FOR loop. (4 marks) Write the program using Python code with a FOR loop. (4 marks) What is the difference between a FOR loop and a WHILE loop? (2 marks) --- Answer Pseudocode with FOR loop START FOR count = 1 TO 5 OUTPUT count END FOR STOP Python code with FOR loop for count in range(1, 6): print(count) Explanation: range(1, 6) means start from 1 and go up to 5. 6 is not included. Difference between FOR loop and WHILE loop FOR loop: Used when you know how many times to repeat. Example: print numbers 1 to 5. WHILE loop: Used when you repeat until a condition is false. Example: keep asking for password until it is correct. --- Bonus BECE Tip: BECE loves asking “Write a program to find the sum of numbers from 1 to 10” — same idea, but you add a SUM = SUM + count inside the loop. Want me to set that one too, or switch to if-else?

Computer Science

ScanSolve AI Answer

✅ Correct!

Your answers for the pseudocode, Python code, and the explanation of the difference between FOR and WHILE loops are all accurate and well-explained. The Python range(1, 6) correctly generates numbers from 1 to 5.

Was this helpful?

Still stuck on this one?

Ask a follow-up, and the answer starts from this question.

Got a different question?Ask your own question
Handwritten step-by-step solution preview

Handwritten Step-by-Step Solution

Get this as a handwritten image on WhatsApp — like a tutor wrote it for you.

Try on WhatsApp