01. Basic python knowledge,
I. What are the differences between compiled and interpreted languages?
1. Compile the source program into machine code and save the result as a binary file. You can directly use the compiled file at runtime.
2. Only when executing a program is interpreted as a machine language for execution by a computer. Therefore, the running speed is not as fast as that of the compiled program. Python is an interpreted language.
Ii. Install python3.x
1. Download the installation package https://www.python.org/downloads/
2. default installation path: C: \ python35
3. Configure the environment variable [Right-click the computer] --> [properties] --> [advanced system settings] --> [advanced] --> [environment variable] --> 【 in the second content box, find a line with the variable name Path, double-click to add the python installation path to a new line (win10 )]
Iii. Example of variable assignment
Name = "Oldboylinux"
Name2 = name
Print ("My name is", name, name2)
Name = "FeiYangYang"
Print ("My name is", name, name2)
===== Output result ====
My name is Oldboylinux
My name is FeiYangYang Oldboylinux
Drawing description
4. How to annotate content and coding definitions in python
1. Single line comment (one well number) # comment content
2. Multi-line comments (a group of three single quotes) ''' comment '''
3. Define the encoding (python uses ASCII code by default)
#! /Usr/bin/env python
#-*-Coding: UTF-8 -*-
======= LHS at least /08/20 ======