Loops: Count and Condition Flashcards

1️⃣ Familiarise yourself with the flashcards:

  • Look through all the flashcards to see what's on both sides.
  • Make sure you understand the information on each card. If something's unclear, click the link to the revision notes at the bottom of the page for more details.

2️⃣ Test yourself:

  • Look at the question or prompt on each card and try to remember the answer before flipping it over.
  • Check the answer and make a note of any cards you find challenging and need to go over more.

3️⃣ Consistently Review and Practice:

  • Use spaced repetition: spend more time on the cards you struggle with and go over them more often.
  • Regularly review all the flashcards to help you better understand and retain the information over time.

Note: We may include questions that have multiple correct answers. It's useful to remember specific examples to understand these concepts better.

PERSONALISED 1-TO-1 TUTORING

Need more help on this topic? Get 1-to-1 support

Get support with clear explanations, practice and feedback (Ages 5 to 16).

  • DBS-checked tutors
  • Flexible times
  • Parents can be updated

Want an ad-free experience? Subscribe to remove ads

What is a count-controlled loop?

A loop that repeats a set number of times using a counter.

What is a condition-controlled loop?

A loop that repeats based on a test, not a fixed count.

When would you pick a FOR loop?

When you know how many times you need to repeat.

When would you pick a WHILE or REPEAT…UNTIL loop?

When you do not know the number of repeats in advance.

In AQA pseudocode, which keywords define a FOR loop?

FOR, TO, optional STEP, and NEXT.

In AQA pseudocode, is the end value in FOR i = 1 TO n included?

Yes. The loop runs when i equals n.

What does STEP do in a FOR loop?

It sets how much the counter changes each time, for example STEP 2 or STEP -1.

Does a WHILE loop check its condition before the body?

Yes. It runs while the condition is true and stops when it is false.

Does a REPEAT…UNTIL loop run the body at least once?

Yes. It checks the condition after the body and stops when the condition is true.

What must you do before a WHILE loop that uses a counter?

Initialise the counter to a start value.

What is an infinite loop?

A loop that never ends because the stop condition is never met.

How many times does this run: FOR i = 1 TO 5?

Five times.