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=” “)
5 10 15 20 25 30 35 40 45 50
Output: