What is one pass of a loop called?
Each complete run of the indented block, once for each item in the list, is called a(n) ...?
Start activityTopics / Loops
Repeated action, accumulating state, and stopping conditions.
Novices and models both lose track of what is true after each iteration. Tracing a tiny loop is cheaper than debugging a generated one.
Each complete run of the indented block, once for each item in the list, is called a(n) ...?
Start activityMatch each term to the definition that fits it. The code is there so you can see what each term refers to; …
Start activityWhat is printed when this program finishes?
Start activityExplain in plain English what this code does. Say what repeats, what changes each time, and what the program finally shows.
Start activityThe program should print the numbers 1, 2, 3, 4, 5, each on its own line. Which arguments complete range(...)?
Start activityTwo AI-generated programs both try to print the total of the numbers in a list. Each is a separate program. Compare them. …
Start activityThis program totals a list of scores. Extend it so it also prints the average score. The average should be calculated once, …
Start activityRequirement: count_down(n) prints n, n-1, ... 1 and then prints Liftoff. An AI generated the function below. Accept or reject it, then …
Start activity