Python calculator
I am to create a calculator that takes 2 floats as input and performs arithmetic operations on them. Also, there has to be a case when there's zero division. I run: x = float(input()) y = input() z = float(input()) if y == '/' and z != 0: print(x / z) elif y == '/' and z == 0: print("Zero division") if y == '%': print(x % z) if y == '**': print(x ** z) if y == '//': print(x // z) if y == '*': print(x * z) if y == '-': print(x - z) if y == '+': print(x + z) And get: Failed test #1. Runtime error Traceback (most recent call last): File "jailed_code", line 3, in <module> z = float(input()) ValueError: could not convert string to float: 'mod' What's wrong with the code?