- S3 python full stack Day9 Python Development Series Course overview
- S3 python full stack day9 python job requirements and blogs
- Description of Python full stack S3 Day9 programming language
- Python full stack s3 day9 python category Introduction
- Python full stack s3 day9 python installation and environment variable operation (i)
- Python full stack s3 day9 python installation and environment variable operation (ii)
- Python full stack S3 Day9 Python conditional statement and basic data type (i)
- 08python full stack s3 Day9 python conditional statements and basic data types (ii)
- S3 python full stack day9 python first knowledge and variables
- Python full stack s3 Day9 python conditional statements and basic data types (this section is not sound due to device recording issues)
- Python full stack s3 Day9 Python while loop statement and exercises
- Python full stack S3 Day9 exercises Explained
S3 python full stack Day9 Python Development Series Course Overview
1, the Linux Foundation and the Network Foundation although is not the development must the skill, but the entire stack is the future development trend, the basic operation principle must be familiar;
2, Python Development course;
1) Python Basics (base shake)
2) network programming (Sodcket, such as developing QQ, Wechat)
3) The continuation of the breakpoint (such as thunder download ISO image);
4) Web framework (in popular terms, used to write websites);
5) design pattern + algorithm (design greater than code)
6) Project actual stage (writing stage)
S3 python full stack day9 python job requirements and blogs1, basic data type, function, object-oriented programming (similar to the famous aphorism in the composition, the method of the end-to-end echo)2, blog reference:http://www.cnblogs.com/wupeiqi/articles/5433893.html Wu Jianzi Teacher's blog;3. Operation: A. procedure; b. Blog address (purpose, to organize the content of the blog, is the process of their own thinking), recommended:www.cnblog.com 4, the blog Park Classification: Essays (any visible); articles (directly invisible, can send URL sharing visible); Diary (Make Yourself visible) ;
description of Python full stack S3 Day9 programming language1, the development of this matter;
1) Mainly learn how to develop the application software running on the OS, such as QQ, NetEase Cloud music, website;
2, mainstream programming language introduction;
1) Python
Python is an excellent comprehensive language, the purpose of Python is: simple, elegant, clear, in the artificial intelligence, cloud computing, financial analysis, Big Data development, Web development, automation operations, automated testing and other directions widely used, is now the world's 4th largest flow of language;
2) Java
Java is an object-oriented programming language that can compose "cross-platform" applications, and is a generic term for the Java programming language and Java platform (i.e., javase, EE, javame) introduced by Sun Microsystems Company in May 1995. Java technology, with its versatility, efficiency, platform portability and security, is widely used in personal PCs, data centers, game consoles, science supercomputers, mobile phones, and the Internet, while owning the world's largest developer community. In the global cloud computing and mobile Internet industry environment, Java has a significant advantage and broad prospects.
3) PHP
PHP (foreign name: Php-hypertext Preprocessor, Chinese name: "Hypertext Preprocessor") is a common open source scripting language. Grammar absorbed the C language, Java and Perl features, conducive to learning, widely used, mainly applicable to the field of web development, in the domestic preconceived, but in the international has gradually become apparent;
4) C #
5) C + +
6) Ruby
7) Go
8) Summary:
A. Machine language-The advantages of the lowest level, the fastest, the disadvantage is the most complex, the least development efficiency; (Generate machine code)
B. assembly language-The advantages are relatively low level, the fastest, the shortcomings are complex, the development efficiency is lowest; (Generate machine code)
C. High-level language-the compiler executes the fastest, does not depend on the language environment to run, the cross platform is inferior; interpreted cross-platform good, one code, run everywhere, the disadvantage is slow execution, relying on the interpreter or virtual machine to run; (Generate bytecode)
D.python performance is low, the development efficiency is high, but now the machine running speed follows Moore's law;
E.java execution efficiency is high, the development efficiency is lower than python;
9) machine code and byte code
A. Machine code is a computer can directly identify the 01010111;
B. Byte code is converted into a byte code first, and then the machine code is converted once, then the computer can be recognized;
3, programmers want to go far, must learn the low-level language C language, so as to understand its operating principle;
python full stack s3 day9 python category Introduction
1, we now know that Python is an explanation of the remainder, the code wants to run, must be executed through the interpreter. The Python interpreter itself can also be seen as a program (that is, which country of the translator is not important), what language is the program developed? The answer is in several languages.
1) Cpython
2) Jython
3) PyPy (Python developed by CPython), though fast, but not mainstream, is not yet stable.
4) IPython
5) IronPython
Tiobe published April programming language rankings
Http://www.mnw.cn/keji/internet/1970809.html
python full stack s3 day9 python installation and environment variable operation (i)
1. Install the Python interpreter
1) Python official website: https://www.python.org/
2) Python installed on the operating system, we follow the Python rules to write programs, to the Python software, read the contents of the file, and then convert and execute, and finally get the results;
3) Installation of the Python interpreter (recommended Python2.7 and Python3.5.3 are installed)
Https://www.python.org/ftp/python/3.6.5/python-3.6.5-amd64.exe
4, test whether the installation success: windows-"Run-" cmd-"input python, how to enter the interactive environment, indicating the success of the installation;
5, configuration environment variables;
python full stack s3 day9 python installation and environment variable operation (ii)1. The directory structure of the Python interpreter
2, configure the environment variable path, simple execution of the Python interpreter (note the end of the English semicolon);
Environment variables (environment variables) are typically used in the operating system to specify the operating system environment of some parameters, such as: temporary folder location and System folder location. An environment variable is an object with a specific name in the operating system that contains the information that one or more applications will use. For example, the PATH environment variable in Windows and DOS operating system, when the system is required to run a program without telling it the full path of the program, in addition to the current directory in the search for this program, but also in path specified in the path to find. The user can run the process better by setting the environment variables.3. Install two versions, modify Python.exe and Pythonw.exe to: Python2.exe and Pythonw2.exe and Python3.exe and Pythonw3.exe are used to distinguish different Python versions;
python full stack S3 Day9 Python conditional statement and basic data type (i)
1, if~else conditional statement;
#! /usr/bin/env python#-*-Coding:utf8-*-True_name ="TQTL"True_password="Ab123456"Guess_name= Input ("Please enter user name:") Guess_password= Input ("Please enter your password:")ifGuess_name = = True_name andGuess_password = =True_password:Print("user name and password is correct, welcome to the Sky Sunny Mall. ")Else: Print("user name or password is wrong, please re-enter. ")
1) code block;
2) Python strictly differentiates the code block according to indentation;
3) code block indentation must be consistent, the official proposal to indent 4 spaces;
4) The program in Python is executed from top to bottom;
5) Nested execution order of the IF statement;
2. If~elif~else Conditional statement:
Vip_level = input ("Please enter your membership level:")ifVip_level = ="Level 1 Members":Print("a beauty")elifVip_level = ="Level 2 Members":Print("b Beauty")elifVip_level = ="Level 3 Members":Print("C Beauty")elifVip_level = ="Level 4 Members":Print("D Beauty")Else: Print("whatever it is! ")Print("start enjoying the service! ")
1) The program from top to bottom execution, as long as the conditions to print, otherwise the next judgment;
2) Strict attention to the following conditions of the English colon and indentation
3) nesting can support multilayer;
3, the If~else supplement;
1 if Conditions Meet: 2 Pass 3 Else : 4 Print ("xxxx")
08python full stack s3 Day9 python conditional statements and basic data Types (ii)
S3 python full stack day9 python first knowledge and variables1. Print ("Hello world!") Hello, world! 2, although the Python suffix name can be arbitrary, but the import module will be error, so must be written. py end of the file;3, two ways to execute Python code;
1) Python interpreter py file path;
2) Enter code execution directly in the Python interpreter;
4. #!/usr/bin/env python and #-*-Coding:utf8-*-explanation
1) Linux files must be added; function: Declare python interpreter
2) Windows does not require #!/usr/bin/env python;
3) #-*-Coding:utf8-*-in python2.x requirements, python3.x do not require, because python2.x default encoding mode for ascii,python3.x default encoding format is UTF-8
5. Write User Login program
1) Remind the user to enter the user name and password;
2) After obtaining the user name and password, the comparison: User name =root, password =root;
3) If correct, prompt login success; error, prompt login failed;
6, the introduction of the variable (the middle result of the program operation temporarily loaded into memory, in case the subsequent code continues to call, the names of the scientific name is called "variable");
1) variable names can only be any combination of letters, numbers, and underscores (cannot start with a number);
2) The keywords in Python cannot be declared as variables [' and ', ' as ', ' assert ', ' break ', ' Claa ', ' Continue ', ' Def ', ' del ', ' elif ', ' Else ', ' except ', ' exec ', ' Finaly ', ' for ', ' from ', ' global ', ' if ', ' import ', ' in ', ' was ', ' lambda ', ' not ', ' or ', ' pass ', ' print ', ' raise ', ' return ', ' try ', ' while ', ' with ', ' yield ']
3) variable names need to "see the name of the known," such as Name,age,sex,come_from,hobby;
4) Variable names are strictly case-sensitive, such as name and name are two different variables;
5) How variables are defined
A. Camel's name method: ageoftqtl=26;numberofstudents=1000
B. Underline: age_of_tqtl=26;number_of_students=1000 (official recommendation, recommended by individuals)
6) Modification of variables:
A. Variable named Chinese, pinyin (low) xinming= "Cuixiaozhao", nianling=26
B. Variable name too long: for example, Where_are_you_from = "Hebei"
C. variable nouns do not convey: for example, fdjskfkldasfd=25 (immortal also can not understand)
7) Definition specification of variables
Name = "Cuixiaozhao"
On the left is the variable name, and the right side of the equals sign is the variable value;
python full stack s3 Day9 python conditional statements and basic data types
1. String
1) characters quoted in Python are considered "strings"-single, double, three single, and three double quotes are strings
1 ' Cuixiaozhao ' 2 " Cuixiaoshan " 3 " " Cuixiaosi " " 4 """ Cuixiaolei """
2) Concatenation of strings (addition)
1 " Cuixiaozhao " 2 " _TQTL " 3 names = name + name_alias4print(names)# CUIXIAOZHAO_TQTL
3) Multiplication of strings
" _tqltl " = name *print(names) _tqltl_tqltl_tqltl_tqltl_tqltl_tqltl_tqltl_tqltl_tqltl_tqltl
python full stack s3 Day9 Python while loop statement and exercises1. Dead Cycle
Import= 0 while Count <: print("OK " , Time.time ()) + = 1# comment out the code, the dead loop print("The loop is over!") ")
python full stack S3 Day9 exercises explained1. Using while loop printout 1 2 3 4 5 6 8 92, to seek the 1~100 of all the numbers between;3. All odd numbers within the output 1~100;4. All the even numbers within the output 1~100;5, to seek 1-2+3-4+5-6+7.....+99 and;6. User Login (give three chance to try)
python3.x Full stack-day09-python language introduction, variables, basic data types and while loops