Data sources :link
It is not difficult to see from the data that in recent years python The popularity of is increasing year by year , So learn python Such a good tool can not only bring us promotion and salary increase , It also means python It can improve our work efficiency . I have studied for a long time python, But it belongs to that kind of · Dongyi hammer , West a mallet . Nothing . So I'm going to spend the next 200 days , Systematic learning python knowledge , And write a blog to sum up their knowledge . This time, , My blog is for myself !
1. If Sogou input method is not installed on the computer , It is recommended to install a Sogou input method
2.
Right click the icon , Click more settings -> Property settings -> Commonly used -> Use English punctuation in Chinese
1.python It's an interpretative language , The operation efficiency is relatively low ;
2.python Syntax simple language type ;
3.python Is a weak language type ( A variable has no specific data type )
1.int(integer): It has a wide range of values , It is generally enough in our daily use ; Basic operation :+ - */ %( Remainder ) For division, you should note that the divisor is not 0
( Title source : Cattle from )
If the 0 As divisor , Will produce ZeroDivisioError It's abnormal
2.str(string): Basic operation :+: String splicing , It is required that the spliced parts are all strings , Otherwise, there will be an exception ;*: Followed by an integer , Means to repeat a string n All over
3.bool(boolean): There are only two values True;False. If the proposition is true, then True, A false proposition is False.
1. A variable is a value that is temporarily stored during program operation , For subsequent procedures .
1. Variables can only be composed of alphanumeric underscores
2. Variable variable name cannot be in Chinese
3. When naming variables, do not allow numbers to appear in front
4. Variable naming cannot use the keyword
5. Variable names cannot be too long
6. Variable naming depends on the meaning of the name
7. It is recommended to use hump naming or underline naming for variable naming
User interaction means using input() Get user input , Note that the value entered by the user is treated as a string .
if sentence :
One .
if Conditions for a :
Results a
Result two
Two .
if Conditions for a :
Results a
else:
Result two
3、 ... and :
if Conditions for a :
Results a
elif Conditions :
Result two
else:
Result three
Four ( nesting ):
if Conditions for a :
Results a
if Condition 2 :
Results a
else:
Result three
Result four
if Judgment can be nested infinitely , But don't nest too much. Generally, you can nest three layers at most
At the end : Little Joe has to work hard to be strong