Question Detail

BIO 107 While Loops & Control Flow Objective Question

Question

What is the primary purpose of "Iteration" as described in the learning outcomes?
Options
A To define the start and end points of a program.
B To repeat a block of code multiple times.
Correct Answer
C To handle errors and exceptions in code.
D To declare variables and data types.
Correct Answer

Option B is the correct answer.

Detailed Explanation

The learning outcomes state "Understand the concept of Iteration." and page 3 further explains that iteration "saves you from writing the same code 1,000 times," indicating repetition.

Hint

Think about what 'iteration' literally means in the context of programming.

Question Info