Python Forum
I do not understand why my python looks different from tutorials. - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: I do not understand why my python looks different from tutorials. (/thread-21746.html)



I do not understand why my python looks different from tutorials. - noodlespinbot - Oct-12-2019

For some reason mine looks like this:
https://imgur.com/a/4NLgRSP
But all the tutorials are like this:
https://imgur.com/a/5xtIS1r



Thanks in advamce!


RE: I do not understand why my python looks different from tutorials. - buran - Oct-12-2019

"yours" is what we call python interactive mode. That is when on command line you type python (or python3) and hit Enter. You can see the interactive prompt >>>. Each line is executed when you hit Enter. This is for quick experiments, test ideas, etc. You want to write your code as scripts (in files) in order to be able to reuse them.
"tutorials" is some IDE (but could be just some text processing program like Notepad). In the IDE you write your script and save it as .py file and then on command line you eneter something like
C:\>python your_script.py (that on windows)

read this for different ways to execute python code

There are multiple threads that discuss different IDEs - you can search for them

Finally, in future don't post images, copy/paste code in python tags
Please, use proper tags when post code, traceback, output, etc.
See BBcode help for more info.


RE: I do not understand why my python looks different from tutorials. - noodlespinbot - Oct-12-2019

Is this what python shell is for?