So, I'm doing some practice before my school assessment, was wondering how I'd make it so that when I enter an integer with a 0 as the first value, it wouldn't convert it into an integer with no zero at the start. Here's a little extract of my program:
initialNumber = int(input("Enter your 10 digit number: "))
while len(str(initialNumber)) != 10:
print("Next time please enter a 10 digit numerical value excluding decimals...")
time.sleep(1)
initialNumber = int(input("Enter your 10 digit number: "))
calculator()
I'm using Python 3.4, I understand that I could do something along the lines of this:
initialNumber = input("Enter your ten digit number")
I understand that by using this it keeps the "0", but I need to convert the string into an integer for arithmetic purposes. Any help would be greatly appreciated :)