Many beginners do not know how to install correctly Python, Simply write down .
Python There are two important versions of the language ,Python2 and Python3, There are differences in grammar between the two .Python2 It has become history , Now the whole world uses Python3 edition . So do we Python3 edition , Apply to Windows 7 and Windows 10 System .
Here choose the more popular Python 3.9.0 Of 64 Bit version , Click the link below to download .
https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exehttps://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe
Other versions are available in Download Python | Python.org The page chooses itself .
High end computer players can also download quickly from domestic rogue download stations , Be careful not to click on some advertising links .
Double click Install Package , Enter the installation interface . Be careful Several options must be checked . Check a few options , It can greatly reduce all kinds of inexplicable problems .
Wait for installation to complete ,Python The installation of is over . Now you can start writing and running Python Code. .
Find... In the application list Python 3.9.0, Click on IDLE . I use my own computer here Python 3.7 Screenshot of version ,Python 3.9.0 similar .
1) Create and save code files
stay IDLE Software , Click on the File->New File, A window similar to Notepad will pop up , Write it in it Python Code , And save it as my.py that will do .
When you need to edit the contents of the file again , Right click on the my.py , choice 【Edit with IDLE】 that will do .
2) Run code file
Use IDLE open my.py After the document , Click on the menu bar Run-> Run Module, A new window will pop up , The blue in the new window is the running result of the code .
Use Python Self contained IDLE Tools to write and run Python Code. . But for the convenience of writing 、 Debugging and running code , There are more powerful and convenient tool software , such as PyCharm Software . Its domestic official website is PyCharm:JetBrains For professional developers Python IDEhttps://www.jetbrains.com/zh-cn/pycharm/ The software has a commercial fee version , There are also free and open source community editions . Community Edition (PyCharm Community Edition) Is a completely free version , The function is enough for beginners , Code hinting , Syntax highlighting and other basic functions are all available .
Community version download address :
Thank you for downloading PyCharm!
Installation and use are slightly complicated , It is not recommended for beginners to use .
By chance IDLE In the Turtle The case code of the graphics library , And it can run directly . Let's also explain .
Turtle yes Python Self contained Drawing Kit .Turtle The English translation is turtle 、 Tortoise means , It's interesting to name a turtle . As you can imagine , There is a turtle on the beach , It uses its tail to draw lines on the beach , Climb right 10 rice , Just draw it with your tail 10 A meter long line . If you lift your tail and climb , There is no trace on the beach ( Line ), You can draw a line by putting down your tail and climbing .Turtle This is how the package's drawing function name is designed , It's very intuitive .
Click on Bottom START Run code , In the window on the right , See the turtle using its tail draw Yin Yang Tai Chi diagram .