following code contains an endless loop.could you find out why?auggest a solution n=10 ,answer=1,while(n>0):,answer=answer+n**2,n=n-1,print(answer)
Attachments:
Answers
Answered by
2
Answer:
This is not a endless loop.
It terminates after 10 iterations.
Explanation:
Right side of the screenshot is the result from execution.
Attachments:
Similar questions