Please check why my beginner's Calculator isn't working!
#Project "basic Calculator" #-I am a beginner, so dont judge plz import math #FIRST ALGORITHM THAT DIDNT WORK #----------------------------------------------------------------------- #x = float(input("Give me a number: ")) #print("Your first number is ", x) #y = float(input("Give me another number: ")) #print("Your second number is ", y) #z = str(input("Addition, Subtraction, Multiplication or Division ?")) #----------------------------------------------------------------------- #I SAW THIS TRICK ON STACKOVERFLOW BUT IT DIDNT WORK #----------------------------------------------------------------------- x , y = float(input("Give me two numbers:")).split(",") print("One number is ", x) print("Second number is ", y) z = str(input("Addition, Subtraction, Multiplication or Division ?")) #----------------------------------------------------------------------- #THE IF STATEMENTS #----------------------------------------------------------------------- if z == "Addition" or z == "addition": print(x + y) elif z == "Subtraction" or z == "subtraction": print(x - y) elif z == "Multiplication" or z == "multiplication": print(x * y) elif z == "Division" or z == "division": print(x / y) else: print("Sorry we couldn't catch you, can you repeat?") z = str(input("Addition, Subtraction, Multiplication or Division ?")) #-----------------------------------------------------------------------