0

Why is it that I can simply run the sum of two numbers in Python's IDLE, but cannot do the same in Pycharm without assigning it a variable?

Running the sum 1 + 1 on Pycharm produces nothing without assigning it a variable and then printing it. I was able to do this easily in the IDLE I received from my Python installation. Why is this so? I'm inexperienced with Python and programming in general. Any help would be appreciated. Thank you!

pyloser
  • 1
  • 2
  • Probably useful: http://stackoverflow.com/questions/19329601/interactive-shell-debugging-with-pycharm – Pieter van den Ham Apr 29 '16 at 14:41
  • In an interactive session, the input is read, evaluated and then printed. When you write 1+1 into a file, and then run python, the result is computed and then discarded. – timgeb Apr 29 '16 at 14:41

1 Answers1

1

Sure, you can use the PyCharm console. If you just write 1 + 1 to a file, it shouldn't be doing anything. Just go to Tools > Python Console.

enter image description here

Games Brainiac
  • 80,178
  • 33
  • 141
  • 199