Python download installation and configuration

WeChat public account: IT Bond
Insert picture description here

  1. Enter the official website
    www.python.org/downloads/

  2. download
    Insert picture description here

  3. Installation (not much different from installing general software)
    Insert picture description hereInsert picture description hereInsert picture description here
    environment variable problem
    Check: "Add Python to environment variable". This will add Python to the environment variable Path, and we can run the Python interpreter in the command line mode of windows.
    Insert picture description here
    Insert picture description here
    4. Python development environment The
    development environment is IDE (Integrated Development Environment) in English. Don't worry about which development environment to use. The development environment is essentially a package of the Python interpreter python.exe, and the core is the same. It can be said: "The development environment IDE is just a plug-in of the interpreter", just to make programming more convenient for programmers
    and reduce the error rate, especially spelling errors.

    Common development environments are as follows:
    IDLE, Pycharm, wingIDE, Eclipse, IPython

  4. Interactive mode (script shell mode)
    enter the command line window, enter: python
    Insert picture description here
    5. Use in IDLE development environment

    IDLE frequently used shortcut keys

    Alt+N Alt+P: View the previous and next historical commands
    Ctrl+F6: Restart the shell, all previously defined variables are invalid
    F1: Open the help file
    Alt+/: Automatically complete the previous words
    Ctrl + [Ctrl + ]: Indent code and unindent
    Alt+M: Open the module code, first select the module, and then press this shortcut key, it will help you open the py source code of the modified module for browsing.
    Alt+C: Open the class browser for easy access Switch between each method body in the source file
    F5: Run the program

7. The first Python source program

print("a")
print("b")
print("c")

The small points to note in the first Python program:

  1. Do not add spaces at the beginning of the line in the program.
  2. Spaces have the meaning of indentation in Python.
  3. The symbols are all English symbols, not Chinese. such as:(,"

Guess you like

Origin blog.csdn.net/weixin_41645135/article/details/115275353