Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4
If you are in a Python command line interpreter ( kind of console/terminal, lines beginning with some prompt like '>>>' ), typing '6+3' is enough ( if you validate by [enter] key ) to print the result of the expression, as the value of a variable by just typing its identifier name... But if you are writing script in text file ( what's the virtual case of code playground as well ), this isn't enough ( in addition to run/execute the script ) to output anything... To do it, you must use the print() function: print(6+3)
9th Feb 2017, 11:28 AM
visph
visph - avatar