Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

what is missing in the following program in order to have the output sh…

Question

what is missing in the following program in order to have the output shown?
numa = 24
while numa 3:
numa = numa - 7
print(numa)
output: 3

Explanation:

Step1: Analyze loop condition

The loop should continue until numA reaches 3. So we need a condition that keeps the loop running while numA is greater than 3.

Step2: Determine operator

The appropriate operator is '>'. When numA is greater than 3, the loop will execute and subtract 7 from numA each time until numA becomes 3.

Answer: