0
The Calculations such as addition and subtraction don't work in python code playground
5 Réponses
+ 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.
+ 1
Share the code that doesn't work.
+ 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! :)
0
2+2
0
That's all I wrote