Ask coding questions

← Back to all posts
help
GLXYWolfy

why doesnt the print show up

Comments
hotnewtop
aa2dee2

When you're taking input for the operator on line 6, you need to convert it to an integer type. (All inputs by default are of string type.)

So on line 11 you're essentially checking "1" (a string) against 1 (an integer), which won't match.

You also need to do this for num1 and num2 - the inputs received are also strings so if you enter 7 and 6 as inputs, the output will be "7" + "6" which is "76" and not 13.
example code -> num1 = int(input("Please enter your first number: "))

Also, as @ch1ck3n mentioned below, you don't need the print function inside the input function.

ch1ck3n

you don't need print() inside of input() so you can just do input('dfdsdsfdsfs')