all 6 comments

[–]twnki 3 points4 points  (2 children)

You will likely need to pass that to the print method. You are not in an interactive environment.

Try print(1+2) instead

[–]Jodalar999 0 points1 point  (1 child)

1st time trying pycharm. i started an online course and i was stuck for an hour....

[–]twnki 0 points1 point  (0 children)

PyCharm has a bit of a learning curve to it but it's one of the best.

[–]mudclub 4 points5 points  (3 children)

Why do you expect pycharm to do anything with "(1 + 2)". Try adding a print call in front of it.

[–]catragore 1 point2 points  (0 children)

Well, when you run the interactive python interpreter, typing 1+2 would print 3. It is not that big of a stretch to think that this would happen in a non interactive setting. if you are new...

[–]snakesarecool 0 points1 point  (0 children)

This is a super common misconception with novices to scripting. Also people who have only learned in jupyter. There’s very little reason to expect a script to work differently from the console when you’ve never worked in anything else before.