Pythons simple calculation help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Pythons simple calculation help

I am trying to input a simple calculation into python and keep getting the message no output.... I am entering the line 2 + 2 this is exactly what is displayed in the python 3 tutorial

7th Jun 2018, 5:17 PM
Aidan
2 Answers
+ 5
Python understands the result of 2+2, but the problem is that it doesn't know that you want it to print the result to the console. print(2+2) # prints to the console The print statement does that work! :)
7th Jun 2018, 5:21 PM
Dev
Dev - avatar
+ 1
try print(2+2)
7th Jun 2018, 5:24 PM
Bruce Mubangwa
Bruce Mubangwa - avatar