+ 1

New programmer

Hi everybody, I just started learning python language few years ago. When I reached the "string" paragraph I decided to practice a bit, but every time I write something it gives me syntax error on this ">>>". For example, I saw that I can write a code like: >>> "Hi, I like cheesecakes!" But it gives me error pointing the 3 ">". Maybe it's a stupid error but I really don't know what to do. Can you help me please? Thank you :)

24th Jun 2017, 5:20 PM
William JaySi (JaySi)
William JaySi (JaySi) - avatar
5 Respostas
+ 10
It is a stupid error :) >>> means the default command prompt in interactive interpreters (the ones that execute lines at once when you press Enter). When editing a code in an editor or here in the Code Playground you don't write the >>> You rather write instructions and blocks of code and when executing, the code gets run at once - not after each line separately.
24th Jun 2017, 5:46 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 5
On the PC version most builds contain both types of interpreters, IDE and interactive. You'll be better off downloading one of the popular IDEs, like Eclipse, Atom or PyCharm. I myself recommend the last one: https://www.jetbrains.com/pycharm/
24th Jun 2017, 7:19 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 1
Thank you for answering. Now I discovered that I also have to put the print function because instead it doesn't work. I downloaded the PC python version and I see that it works like the command prompt and not like a program in C++ (in fact I come from there :D), and it works like a sort of dialogue. The only thing I don't understand is why if on PC i write 7+3 it gives me 10, and if instead I write the same thing on this app it tells me "no output"? I think that the python version is the same (v3), isn't it? Or maybe it doesn't depend from it?
24th Jun 2017, 6:42 PM
William JaySi (JaySi)
William JaySi (JaySi) - avatar
+ 1
Thank you so much.
24th Jun 2017, 8:55 PM
William JaySi (JaySi)
William JaySi (JaySi) - avatar
+ 1
what go after else but 5 letter?????????????????????????????
19th Nov 2020, 11:24 AM
Harvey Myskow
Harvey Myskow - avatar