diff --git a/eCalc/eCalculate.py b/eCalc/eCalculate.py index 2ec508c..c4eaf00 100644 --- a/eCalc/eCalculate.py +++ b/eCalc/eCalculate.py @@ -5,17 +5,19 @@ def CalculateE(roundVal): someE = round(math.e,roundVal); e = str(someE) someList = list(e) - return someE; + return someE - - - - -roundTo = raw_input('Enter the number of digits you want after the decimal for e: ') -try: - roundint = int(roundTo); - print CalculateE(roundint); -except: - print "You did not enter an integer"; +while True: + roundTo = input('Enter the number of digits you want after the decimal for e: ') + try: + roundint = int(roundTo) + print(CalculateE(roundint)) + + break + + except: + print("You did not enter an integer") + + continue