1.

4. Following code contain an endless loop. Could you find out why? Suggest a solution.n=10answerswhile(n>0):Answers answer+n**nentiprint(answer)​

Answer»

Because VALUE of N is always 10 and while loop always SATISFIES the condition Hence INFINITE loop.

in while loop write statement

n = n - 1

Also, please write the QUESTION properly. We have to made assumptions.



Discussion

No Comment Found