I want to write a program that gives the following outputs with the Python while loop.
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
I can't find a way how to do it.
what have you tried so far?
(Dec-16-2020, 12:07 PM)Larz60+ Wrote: [ -> ]what have you tried so far?
a=1
while(True):
a+=1
print(a)
break
I know this is not the correct answer. But how should I write here so that I can find the correct answer.
First write the steps out in English. Then try coding each step. Think about how you would use loops to accomplish your task.