Code playground displays syntax error? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Code playground displays syntax error?

Hey guys. When I try to do this >>>print('Hello world') and run this on code playground it always says syntax error. Whats wrong?

30th Aug 2017, 9:18 PM
Marcel
4 Answers
+ 6
The three '>>>' are not intented to be typed ^^ This is the 'prompt' of a command line interpreter... Playground behaviour is like a Python file ran, not a command line, and even so, the 'prompt' is here, but nere must be typed ;)
30th Aug 2017, 9:20 PM
visph
visph - avatar
+ 6
Again because in Playground you're like in a file, and output require use of print() function ^^
30th Aug 2017, 9:23 PM
visph
visph - avatar
0
Thanks i got it ^^ Now when i try 9+2 It says no output?
30th Aug 2017, 9:22 PM
Marcel
0
Ahh really got it now! Thanks again :)
30th Aug 2017, 9:26 PM
Marcel