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

Calculate

Why I put 1+1, but there is no output?

15th Jul 2019, 11:24 PM
Desmond Wang
Desmond Wang - avatar
2 Answers
+ 8
If you are using the Python shell, e.g. in IDLE, then you will see the prompt: >>> If you type 1+1 and hit enter, you will get 2: >>>1+1 2 However if you are typing a code that has to be "run", e.g. in the Code Playground, there is no >>> prompt and you have to enter commands such as print() to get an output on the screen.
17th Jul 2019, 4:43 AM
David Ashton
David Ashton - avatar
+ 6
Because you have not outputted the value somewhere, or even stored it. print(1+1) will help you see your result
15th Jul 2019, 11:26 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar