Variable:
Variables are stored in order to store some intermediate results in the process of program operation, in order to facilitate later invocation.
Cases:
Print ("Hello world!")
Print ("Alon")
Print ("alon_x")
Name = ("alon_x")
X=3
Y=4
Z=x*y
Print ("X*y", Z)
Print ("z=", Z)
The code format must be aligned, or it will be an error. indentationerror:unexpected indent ("Hi, man, your file is not in the right format, it may be the tab and space is not aligned, you need to check the tab and the Space ")
Defines the value of x, y to give Z records the result of the operation Z is convenient to call the result Z.
- Naming rules for variables
- To have a descriptive
- Variable names can only be underlined _, numbers, and letters, not special characters.
- Cannot use Chinese as a variable name
- Cannot start with a number or a space
- Reserved characters are not allowed to be used
Constants: Constants that are constant, such as ππ=3.1415926 ....
All variables in Python are mutable, so all uppercase variable names are used in Python to represent the secondary variable as constant
The role of Python full stack development day3 variable