Computer Science, asked by marysujatha2019, 1 month ago

write the output i=10 while(i>=6):

print(i,end=’\t’)

i=i
Answers please​

Answers

Answered by dreamrob
8

Given program:

i=10  

while(i>=6):

   print(i,end="\t")

   i = i

In the above program, the loop will not terminate because the value of i will always be equal to 10 and because of this the terminating condition will never get satisfied.

So, it will print 10 on the whole screen.

To terminate the loop, we need to do some changes in the program.

Now new program is:

i=10  

while(i>=6):

   print(i,end="\t")

  i = i - 1

The output of the above program will be now:

10     9     8     7     6

Similar questions