# beginner's problem

 Saša Krnojelac · March 2, 2015 First of all thanks for the tutorials. I do not know much English,but the tutorials are well placed. I began to learn python. I try to make a calculator. I do not know what's wrong. (Syntax eror) print ("Welcome to the calculator!!!")printx=input("Enter the number: ")o=input("Enter the operation (+,-,*,/) ")y=input("Enter the number: ")if o is + :    print("You have selected collection")    r=x+y    print("Result is: "),relif o is -:    print("You have selected subtraction")    r=x-y    print("Result is: "),relif o is *:    print("You have selected multiplication")    r=x*y    print("Result is: "),relif o is /:    print("You have selected sharing")    r=x/y    print("Result is: "),relse :    print("Have not entered the correct operation")

## Replies

 Saša Krnojelac · March 5, 2015 Thank you very much, but now I have another probelm.When I start the program it closes after I enter the number 2 !!! Jinjoo Hat · March 3, 2015 Hello there! Seems like it's still reading it as a string. To convert this to an integer, type in int and enclose it in parenthesis. ``x=int(input("Enter the number: "))y=int(input("Enter the number: "))``More info here: https://docs.python.org/3.4/library/stdtypes.htmlAlso, there's another problem with your code. the variable r is outside the print function so the result will not print if you run this. Put r inside the parenthesis like so:``print("Result is: ",r)`` Saša Krnojelac · March 2, 2015 Thank you very much, but now I have another probelm. 1)When you enter the number and operation program we not collect2)When pick a seizure or another operation program throws an error bob babuinas · March 2, 2015 Have ia you tried instead if is put == and instead of + put "+"? Since you are working with strings you need to check if string is eaqual to another string. If o=="+": try this if statement
• 1

## Python

130,000 followers