First, Introduction
With the development of the Internet, different programming languages have changed, the application of Python language is more common, so I have to learn it.
Learning version: python3.0
Plugin: Pycharm
Second, the content
2.1 Variables
Format: Variable name = assigned value
Example: Age = 23
Data type
Digital type: Int (integer), float (floating point type)
Text type: string (String)
BYTE type: Binary
Logic type: "Yes/no" "On/Off"
2.2 Python text annotations
#: Single line comment
'/' "": Single and double quotes are multiline comments
2.3 User interaction
2.3.1 Let the user enter with input
Format: input (' cue phrase ')
2.3.2 The password entered is not visible, you need to reference the library file Getpass
2.4 There are two ways to print multiple lines of information
2.4.1
2.4.2
2.5 If statement
Format:
If condition:
Content
Elif Conditions:
Content
Else
Content
2.6 While statement
Format: While condition:
Content
Else
Content
The difference between 2.7 break and continue
Break: End this cycle
Continue: Jump out of this loop for the next loop
III. Preparation of the procedure
1. Guess the age of a person and have three chances. After guessing three times after the line continue to guess, enter to continue to guess, do not want to guess the end of input n.
Python Learning-1