Python basics 1 and python Basics
Variable: Information stored, called, modified, or operated in the future
Constant: Fixed amount, all uppercase letters
Naming rules:
Note:
#: Comment on a single line
"Or ''': multi-line comment
Get user input: Input ("")
Strong conversion:Str (integer type) # convert Integer type to string type
Int (string accepted) # convert string type to integer type
Arithmetic Operator:
+ -*/! // (Take the entire division) %
Comparison Operators: Each comparison is actually a condition judgment, and a True or False value is obtained accordingly.
<,>, <=, >=, = ,! =
Assignment operator:
=, + =,-=, * =, % =, // =, ** =
Logical operators:Logical operators are used for logical computing. They are expressions or variables used for conditional judgment.
Not: If the expression is True, the returned result is False. Otherwise, the returned result is True.
And: returns True if both expressions are True. If one expression is False, return false.
Or: If either expression is True, the return result is True.
Expression:An expression is a code or statement consisting of operands and operators. An expression can be evaluated and placed on the right of "=" to assign values to variables.