Python Forum
I do not understand why my python looks different from tutorials.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I do not understand why my python looks different from tutorials.
#1
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!
Reply
#2
"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.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
Is this what python shell is for?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Understand what it means that everything in Python is an object... bytecrunch 8 3,779 Mar-19-2021, 04:47 PM
Last Post: nilamo
  Understand order of magnitude performance gap between python and C++ ThelannOryat 4 2,697 Mar-17-2021, 03:39 PM
Last Post: ThelannOryat
  Zlib tutorials Vwjap 2 2,375 Mar-13-2021, 09:22 PM
Last Post: Vwjap
  Trying to understand the python code spalisetty 2 1,864 Mar-16-2020, 08:11 AM
Last Post: javiertzr01
  Hi, looking for "dunder" tutorials. AlluminumFoil 3 2,017 Mar-02-2020, 08:37 PM
Last Post: jefsummers
  I dont understand bytes in python. blackknite 3 3,987 Oct-02-2019, 07:39 PM
Last Post: Gribouillis
  Python Modules and Tutorials marienbad 1 2,203 Jan-31-2019, 08:36 PM
Last Post: ichabod801
  mpi4py examples/tutorials MuntyScruntfundle 1 2,686 Dec-01-2018, 10:22 PM
Last Post: Larz60+
  Trying to understand how import works in python patrick99e99 3 3,860 Jun-12-2018, 04:48 AM
Last Post: patrick99e99
  in tutorials: Never use "for i in range(len(sequence)): Skaperen 1 3,846 Oct-07-2016, 05:05 AM
Last Post: Mekire

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020