← Back to CoursesComputer Science: Beginner

Neuroanatomy Explorer

Drag to rotate · scroll to zoom · click regions to explore

View
Loading 3D model…

Click a region
to explore it

Memory Deck

Flip each card and rate whether you knew it. Your score is saved.

Term
Definition

Deck complete — score saved.

Match the Pairs

Match each term to its definition. Finish the board to earn your score.

All matched — score saved.

Concept Constellation

Every key idea in this course, mapped as an explorable 3D constellation. Drag to rotate, scroll to zoom, click a node.

Click a node to read its definition.

Loops: Repeating Instructions

Manual: General · Subject: Computer Science

Show how loops help computers repeat tasks efficiently and avoid duplicated code.

Doing the same thing many times

What is a loop?

A loop repeats a set of instructions. Loops are useful when the same action must happen many times.

Counting loop idea

  1. 1

    Step 1: Start with a counter.

  2. 2

    Step 2: Run the repeated instructions.

  3. 3

    Step 3: Change the counter and stop when the goal is reached.

ℹ️

Why loops matter

Without loops, programs would need many repeated lines of code, which is harder to write and maintain.

What is the main purpose of a loop?

Why are loops useful?

Two common loop ideas

Counting loop

  • Repeats a known number of times
  • Often uses a counter

Condition loop

  • Repeats while a condition stays true
  • Stops when the condition becomes false

If you want to print numbers from 1 to 5, which concept is most useful?

What must eventually happen for a loop to stop?