- Python positioning
- Variable
- User-to-program interaction
- Basic data types
- Formatted output
- Basic operators
- if...else of Process Control
- Process Control while loop
- Process Control for loop
- Extended Reading
- Homework
Python positioning:
# High-level language: Standing in the Human (slave) angle, speaking, that is, using human characters to write programs, shielding the operation of the hardware. # explanatory type (interpreter required, equivalent to simultaneous interpretation): such as python, slow execution, easy debugging.
Variable:
How to define variables:
# variable name (equivalent to house number, the space to which the value is located), equal sign, variable value name='guoxq'age =18
Definition Specification for variables:
# 1. Variable names can only be any combination of letters, numbers, or underscores #2. The first character of a variable name cannot be a number #3. The keyword cannot be declared as a variable name [' and ', ' as ', ' Assert ', ' Break ', ' class ', ' Continue ', ' Def ', ' del ', ' elif ', ' Else ', ' except ', ' exec ', ' finally ', ' for ', ' from ', ' global ', ' If ', ' import ', ' in ', ' was ', ' lambda ', ' not ', ' or ', ' pass ', ' print ', ' raise ', ' return ', ' Try ', ' and ', ' with ', ' yield ']
How to define:
# underline (recommended)AGE_OF_GUOXQ =80
Defined variables are: id,type,value
#the 1 equals sign compares value,#2 is the ID of the comparison#emphasize:#1. Same ID, meaning the type and value must be the same#2. Value the same type must be the same, but the ID may be different, as follows>>> x='Info guoxq:18'>>> y='Info guoxq:18'>>>ID (x)4376607152>>>ID (y)4376607408>>> >>> x = =ytrue>>> x isYfalse
Getting Started with Python