Any idea why python is not giving any output for integers

That isn’t ‘python’, it’s the IDE you are using. If you open a Python REPL with just plain ‘python’ at the command prompt, and type ‘2+2’ at the REPL prompt, you’ll see ‘4’ output.

If your IDE does not provide the same behavior, that’s under the control of the IDE.


I’m pretty sure that’s PyCharm. It has a built-in Python console. Accordingto this web page, the console can be opened from the Tools menu.