24.6k views
2 votes
Consider the following code:

start = int(input("Enter the starting number: "))
stop = int(input("Enter the ending number: "))

x = 4
for i in range (start, stop, x):
print (i, end=" ")
What is output if the user enters 20 then 32?

Group of answer choices

20 24 28 32

20 24 28

24 28 32

24 28

1 Answer

4 votes

Answer:

20 24 28

Step-by-step explanation:

Since the range starts at 20 and goes up to but not including 32, the loop will execute three times, with i having the values of 20, 24, and 28.

Therefore, the output of the program is "20 24 28".

User Jim Rota
by
7.5k points