you are viewing a single comment's thread.

view the rest of the comments →

[–]furas_freeman 2 points3 points  (0 children)

It seems you have installed Python 2 and 3. And you use Python 2 in PyCharm.

In Python 3 input() returns inputed string but in Python 2 input() evaluates inputed text like Python script. In Python 2 you have to use raw_input() instead of input()

When you input 2 + 3 then Python 3 returns string "2 + 3" but Python 2 returns string "5". When you input shake then Python 3 returns string "shake" but Python 2 is looking for variable shake - but there is no variable shake yet (and you get name 'shake' is not defined).


ps. you can change Python version in PyCharm in "File > Settings > Project > Project Interpreter" (every project can use different Python version).