python basic statement

python basic statement

You must assign a value to a python variable before using it, because python variables do not have default values.

Get user input value

 

Note at this point: The return value of the input function is a text or a string.

some simple functions

power

 

absolute value

 

rounding floating point numbers

 

Round numbers down using modules

 

Round numbers up

 

Import a specific function in a module

The format is as follows: from module import function

 

Use variables to refer to functions

 

Complex arithmetic with python

 

Note: Unless you must use the from version of the import command, you should stick to the regular version of the import command.

python supports complex arithmetic

 

__future__ module never understood

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325273442&siteId=291194637