Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # By EthPunch
- '''
- Hi, I'm a beginner with Python and this is one of my first full creations. You basically have a start and a finish integer and the program will count between them. For some reason, anything below -5 drives the program insane. If you know why, then please let me know.
- '''
- def tuna(testvariable):
- print("\nHey, welcome to EthPunch's Python Number Counter!")
- start = int(input("Please enter the number you wish to start at: "))
- print(start, " - cool. Now enter the number you want to finish at: ")
- end = int(input())
- print("So we're starting at ", start, " and we're ending at ", end, ". Please press '0' to continue, or '1' if you've made a mistake typing.")
- cucumber = int(input())
- if cucumber is 0:
- decider(start, end)
- elif cucumber is 1:
- beef(testvariable)
- else:
- print("Hey, it looks like you didn't enter a correct number. Let's go back to the beginning.")
- beef(testvariable)
- def beef(testvariable):
- tuna(testvariable)
- def decider(start, end):
- if start < end:
- NormalCounter(start, end)
- elif end < start:
- backwardsCounter(start, end)
- elif start is end:
- samesame(start)
- def NormalCounter(start, end):
- end = end + 1
- for bacon in range(start, end):
- print(bacon)
- print("Done :)")
- def backwardsCounter(start, end):
- cheese = True
- num = start
- while cheese is True:
- print(num)
- num = num - 1
- if num is (end - 1):
- print("Done :)")
- break
- else:
- continue
- def samesame(start):
- print("Are you trying to trick me? Because I'm not counting from ", start, " to ", start, ".\nI'm gonna go eat some beef and we'll start again.")
- beef(testvariable)
- def testFunction():
- print("testFunction seems to be working")
- testvariable = 123
- tuna(testvariable)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement