Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def Count(): # Define Function
- try:
- countt = 0 #Define Count
- num1 = int(input('Enter First Num: '))# Getting User
- num2 = int(input('Enter Second Num: ')) # Input
- # while is true when first number is less than second number
- while num1 < num2:
- if num2 <= 10000:
- num1 += 1 # adding 1 to first number aka num1
- countt += 1 # adding 1 to the count
- print(num1)
- if num2 >= 15000:
- num1 += 1 # adding 1 to first number aka num1
- countt += 1 # adding 1 to the count
- # Some error Fixes
- if num1 > num2:
- print("First Number must be Less than the Next or Equal to")
- break
- # Printing the Result
- if num1 == num2:
- print(countt)
- break
- # Some error Fixes
- except ValueError:
- print("Input must be A number")
- except KeyboardInterrupt:
- print("Stopped")
- exit
- Count() # Just Running The Function you can just delete this if you are importing this script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement