0

The Calculations such as addition and subtraction don't work in python code playground

30th Nov 2019, 1:45 PM
Jamesbond
Jamesbond - avatar
5 Respuestas
+ 3
How is that suppose to work? Code playground is not a calculator that you have on your phone. You need to follow syntaxes and other things. Kindly learn the Python course further to understand.
30th Nov 2019, 1:58 PM
Avinesh
Avinesh - avatar
+ 1
Share the code that doesn't work.
30th Nov 2019, 1:54 PM
Avinesh
Avinesh - avatar
+ 1
The code playground is not Python REPL, I guess you're confusing things. In the REPL or in iPython, you can write calculations and it will output the result. It works the same way as if you had written a program doing print(1+1). However, code playground is meant for you to actually write a program. So, it's expected that 1+1 will not work. Unless, of course, you assign it to a variable: a = 1+1 ...or you input it into a function... print(1+1) Happy coding! :)
30th Nov 2019, 6:29 PM
Gonçalo Magalhaes
Gonçalo Magalhaes - avatar
0
2+2
30th Nov 2019, 1:54 PM
Jamesbond
Jamesbond - avatar
0
That's all I wrote
30th Nov 2019, 1:55 PM
Jamesbond
Jamesbond - avatar