Write Another Program Called Program42py Generates Output Using Loop Output Needs Code Ran Q37053332

Write another program called program42.py that generates theoutput as the below, but by using a while loop. Output A whileneeds more code than a for range for the same function! on a newline to end the program as shown below. SAMPLE RUN 5 10 15 20 25 3035 40 45 50


Solution


#Code1.pyi = 5while(i<=50): print(i,end=” “) i += 5

====================

#code2.py

for i in range(5,51,5): print(i,end=” “)

Output:

5 10 15 20 25 30 35 40 45 50

Output:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.