One, Python type
Compile-and-interpret
Compiled type:
Pros: Compilers typically have pre-compiled procedures to optimize code. Because the compilation is done only once, the runtime does not need to compile, so the program execution of the compiled language is highly efficient. Can run independently from the language environment.
Cons: After compilation, the entire module needs to be recompiled if modifications are required. When compiling the machine code according to the corresponding running environment, porting between different operating systems will be problematic, and you need to compile different executables according to the operating system environment you are running.
Explanatory type:
Pros: Good platform compatibility, can be run in any environment, provided the interpreter (virtual machine) is installed. Flexible, modify the code when the direct modification can be quickly deployed, without downtime maintenance.
Disadvantage: Low operating efficiency because it performs edge-to-forward binary
Ii. advantages and disadvantages of Python
Advantages:
1. High development efficiency, with a very rich third-party library.
2. Portability-can be run on all system platforms.
3. embeddable--can be embedded in C or C + + as a script
4. Extensibility--can embed C or C + + programs in some programs, speed up operational efficiency and hide algorithms
Disadvantages:
1. Slow operation, but it's all relative.
2. Code cannot be encrypted and can only exist in clear text
3. Threads cannot take advantage of multi-CPU issues
Three, the first day of basic work
Age = 56Count=0 whileCount < 3: User_guess= Input ("Input your guess:") ifInt (user_guess) >Age :Print("try smaller") elifInt (user_guess) <Age :Print("try bigger") Else: Print("You is so clever") BreakCount+=1ifCount==3: Select= Input ("want to continue? y/n:") ifselect = ='y': Count=0Else: BreakGuess age Code
011day--python Basic Knowledge