Computer Science, asked by prasannaprince21, 3 months ago

Identify and correct the problem with following code.

countdown=10 # count from 10 to 1

while countdown>0 :

print (countdown, end=” ”)

countdown - 1

print(“Finally”)​

Answers

Answered by ashes07
3

Answer:

counter decrement is not enclosed in the loop. check for the indentation

Answered by valeriy69
2

countdown=10 # count from 10 to 1

while countdown>0:

print (countdown, end=" ")

countdown -= 1

print("Finally")

Problem:

Counter was not decremented creating an infinite loop.

Solution:

counter -= 1

\small\mathsf\color{lightblue}useful?\: \color{white}\mapsto\: \color{gold}brainliest

Similar questions