To become the most awesome test and testing development. Learn python from today and write blogs. -- Python BASICS (1), python. -- python
Python 3.4.3 (v3.4.3: 9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license ()" for more information.
Long Integer:
Python can handle very large numbers.
>>> 100000000000000000000000 100000000000000000000000L >>> 100000000000000000000000L 100000000000000000000000L
The normal integer is between 2 147 483 647 and-2 147 483 647. If the value is exceeded, it can be expressed as a long integer (L ), we can also convert the integer into an integer (Add "L" at the end of the input ")
Variable naming rules:
Rule for defining variables: a variable can contain letters, numbers, and underscores, but cannot start with a number. It generally does not start with an underscore.
Function:
Power operator (**) to calculate the multiplication. In fact, you can use a function to replace the operator. This function is pow:
>>> 3 ** 3
27
>>> Pow (3, 4)
81
>>>
We usually call functions provided by pow and other systems as built-in functions. This function also calculates the absolute value of abs (), and round () rounds the floating point number to the nearest integer.
>>> Abs (-12.23)
12.23
>>> Round (17.4501)
17
>>> Round (17.54)
18
Module
Import to import modules
Floor () function, rounded down.
>>> Math. floor (12.78)
12
>>> Int (12.78)
12
>>>
The sqrt () function calculates the square root of a number.
>>> From math import sqrt # This import method is not recommended
>>> Sqrt (9)
3.0
>>>