Here is my first python code. Feel free to use this code anywhere.
#This is the faulty calculator
num1 = int(input("Please input first number: "))
num2 = int(input("Please input second number: "))
ope1 = input("What would you like to perform: "
" + "
" - "
" / "
" * "
" % :")
if ope1 == "+":
ans = num1+num2
elif ope1 == "-":
ans = num1-num2
elif ope1 == "/":
ans = num1/num2
elif ope1 == "*":
ans = num1*num2
if ans == 41*22:
print("Your calculation is 99.")
elif ans == 62+4:
print("Your calculation is 74.")
elif ans == 50-43:
print("Your calculation is 2.")
else:
print("Your calculation is:", ans)
codeded by : BKlp.
instagram : bee_kalpa_
Comments
Post a Comment