Question: Python program strictly using while loop and if else *Change the for x in range to while loop, please do not use functions. -------------------------------------------------------------------- Source
Python program strictly using while loop and if else
*Change the for x in range to while loop, please do not use functions.
--------------------------------------------------------------------
Source Code:
ch="Y" while(ch=="Y"): start=int(input("Start Number: ")) end=int(input("End Number: ")) skipCount = int(input("Skip Count: ")) if(skipCount>end): print("All number displayed must not be greater than the end number") else: for x in range(start,end+skipCount,skipCount): print(x,end=" ") ch=input(" Continue? Y/N: ") print("Thank you!") --------------------------------------------------------------------
Output
Start Number: 5 End Number: 40 Skip Count: 5
5 10 15 20 25 30 35 40
Continue? Y/N: N
Thank you!
--------------------------------------------------------------------
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
