loop = 1
while loop == 1:
print ("---------------------------------------------------------------------")
print ("Welcome to TheJawaEyes' Python Calculator. Integers between 1 and 1000 with answers between those only please.")
print ("1 = Addition")
print ("2 = Subtraction")
print ("3 = Multiplication")
print ("4 = Division")
print ("5 = Powers")
print ("6 = Square Root")
print ("7 = Pi Calculations")
user_choice = int(input("Please choose your option:"))
if user_choice == 1:
addition = int (input("The number you want to add:"))
if len(str(addition)) > 3:
print ("The first number is too big!")
continue
addition2 = int (input("To this:"))
if len(str(addition2)) > 3:
print ("The second number is too big!")
continue
if len(str(addition + addition2)) > 3:
print ("The answer is too big!")
continue
print (addition, "+", addition2, "=", addition + addition2)
if user_choice == 2:
subtraction = int (input("The number you want to subtract:"))
if len(str(subtraction)) > 3:
print ("The number you want to subtract is too big!")
continue
subtraction2 = int (input("From this:"))
if len(str(subtraction2)) > 3:
print ("The number you want to subtract from is too big!")
continue
if len(str(subtraction2 - subtraction)) > 3:
print ("The answer is too big!")
continue
print (subtraction2, "-", subtraction, "=", subtraction2 - subtraction)
if user_choice == 3:
multiply = int (input("The number you want to multiply:"))
if len(str(multiply)) > 3:
print ("The first number you want to multiply is too big!")
continue
multiply2 = int (input("With this:"))
if len(str(multiply2)) > 3:
print ("The second number you want to multiply by is too big!")
continue
if len(str(multiply * multiply2)) > 3:
print ("The answer is too big!")
continue
print (multiply, "*", multiply2, "=", multiply * multiply2)
if user_choice == 4:
divide = int (input("The number you want to divide:"))
if len(str(divide)) > 3:
print ("The number you want to divide is too big!")
continue
divide2 = int (input("By this:"))
if len(str(divide2)) > 3:
print ("The number you want to divide by is too big!")
continue
if len(str(divide / divide2)) > 3:
print ("The answer is too big!")
continue
print (divide, "divided by", divide2,"=", divide / divide2)
if user_choice == 5:
power = int (input("The number you want to raise:"))
if len(str(power)) > 3:
print ("The number you want to raise is too big!")
power2 = int (input("To the power of:"))
if len(str(power2)) > 3:
print ("The power you want to raise by is too big!")
continue
if power2 == 1:
print (power, "to the power of", power2, "=", power ** power2)
if power2 == 2:
print (power, "squared", "=", power ** 2)
if power2 == 3:
print (power, "cubed", "=", power ** 3)
if power2 > 3:
print (power, "to the power of", power2, "=", power ** power2)
if len(str(power ** power2)) > 3:
print ("The answer is too big!")
continue
if user_choice == 6:
root = int (input("The number to find the square root of:"))
if len(str(root)) > 3:
print ("The number you want to square root is too big!")
continue
if len(str(root)) > 3:
print ("The answer is too big!")
continue
print ("The square root of", root, "is", root ** .5)
if user_choice == 7:
print ("1 = Add Pi")
print ("2 = Subtract Pi")
print ("3 = Subtract from Pi")
pi = int (input("Please choose an option:"))
if pi == 1:
pi_add = int (input("What would you like to add to Pi?"))
if len(str(pi_add)) > 3:
print ("The number you want to add to Pi is too big!")
continue
if len(str(pi_add + 3.14)) > 10:
print ("The answer is too big!")
continue
print (pi_add, "+", "Pi", "=", pi_add + 3.14)
if pi == 2:
pi_subtract1 = int(input("What would you like to subtract Pi from?"))
if len(str(pi_subtract1)) > 3:
print ("The number you want to subtract Pi from is too big!")
continue
if len(str(pi_subtract1 - 3.14)) > 10:
print ("The answer is too big!")
continue
print (pi_subtract1, "-", "Pi", "=", pi_subtract1 - 3.14)
if pi == 3:
pi_subtract2 = int(input("What would you like to subtract from Pi?"))
if len(str(pi_subtract2)) > 3:
print ("The number you want to subtract from Pi is too big!")
if len(str(3.14 - pi_subtract2)) > 10:
print ("The answer is too big!")
continue
print ("Pi", "-", pi_subtract2, "=", 3.14 - pi_subtract2)
if pi > 3:
print ("Please enter a valid option!")
continue
if pi < 1:
print ("Please enter a valid option!")
continue
if user_choice > 7:
print ("Please enter a valid option!")
if user_choice < 1:
print ("Please enter a valid option!")