1. abbreviation
For example newline \ n represent [] + newline; backspace \ b + backspace] [Representative; Enter \ r [representatives] + return. You can remember the escape character in accordance with this method meaning
Integer, Integer English as integer, abbreviated do int integer, integer English as integer, abbreviated do int
str represents a string, called String , Integer English referred to as int , called Integer .
2. = and ==
Source world, the assignment symbol = is not equal to the left to the right meaning. Action only for assignment: to put the right content to the left box.
3. integer
The integer [quote] took off the vest, can only "act alone." Once the hit symbol and other text-based data, such as Chinese, English, is given immediately spike.
4. Float
The English name is a float float, and integer (int) and string (str) different, there is no floating point short.
Float may make you a little dizzy, because, [and] precision integer arithmetic result is always different characteristics, the computer's floating-point operations are imprecise, there will be a rounding error. What does this mean?
0.8500000000000001
0.55 (decimal ) = 0.1000110011001100110011001100110011001100110011001101 (binary ) 0.3 (decimal ) = 0.0100110011001100110011001100110011001100110011001101 (binary )
And there is an error in this transition process, so it makes the difference with our program to calculate the results.
Then, maybe after binary arithmetic binary law, and then through a complex formula, the results of the binary to decimal decimal.
5 type () function
So, this type () function how to use it? The answer is: only the contents of the query in parentheses on the line.
As long as you write the content in brackets, type () function will immediately check out its type.
6 str () function
str () function, data can be converted into its string type, regardless of whether the data type is an int, or float, just put in parentheses. This data can be transformed into a string type.
Action = 'is'
Where do you want = 'mirror of the world'
Number The = 153
code = 'access code'
Print (Where do you want the WHO + + code + Action + str (Number The))