Jump to content

Here 's my first Python Program hope you enjoy


G+_Tnt Seeker
 Share

Recommended Posts

Here's my first Python Program hope you enjoy

 

StartNum = raw_input ("Please enter a starting number (Can't be Less Than 0)")#Gets The Starting Number From The User

EndNum = raw_input ("Please enter a Ending number (Can't be Less Than 0 or Starting number)")#Gets The Ending Number From The User

CountByNum = raw_input ("Please enter a number to count by(Can't be Less Than 0)")#Gets The Number Count By From The User

if int(EndNum) < int(StartNum): #Gets The Starting and Ending Number's And Checks if the ending number is less than the starting one

 print "Hey The Starting Number is Greater Than the Ending One." #if the ending number is less than the starting one, it will print this

else: #if the if stament StartNum > EndNum is False

 for counter in range(int(StartNum),int(EndNum),int(CountByNum)): #Gets The Number's Enterd By The User And Count's

   print counter #Print 's The Counter

raw_input ("press enter to exit") #Press Enter To Exit

Link to comment
Share on other sites

 Share

×
×
  • Create New...