# Getting Started with python3 # 3 Try Advanced Computations Using Import Statements

Hi, my name is beatbox4108. This time, I would like to write about advanced calculation using __import statement __.

# What is the import statement in the first place?

You can use the __import statement __ to execute other python files (.py .pyw).

## Import statement type

ʻImport module name`: You can refer to it in a python file as `module name`. ʻImport module name as reference name`: You can refer to it in a python file as a `reference name`. `from module name import function name`: Imports the specified function. `from module name import *`: Import all functions in `module name`.

There is a math module in the python standard library, so I would like to import it and use it. Please write like this.

#### `main.py`

``````
import math as m
print("Pi:",m.pi)#3.141592653589793
print("3.Round up 5:",m.ceil(3.5))#4
print("3.Devaluation of 5:",m.floor(3.5))#3
print("3 to the 5th power:",m.pow(3,5))#243.0(The power of the math module is returned as a float type. Built-in pow function,**You can also use operators.)
print("sin 100:",m.sin(100),",cos 100:",m.cos(100),",tan 100",m.tan(100))
#sin 100: -0.5063656411097588 ,cos 100: 0.8623188722876839 ,tan 100 -0.5872139151569291
print("Square root of 9",m.sqrt(9))#3
``````

... you can do it well. Next, I haven't posted the table of arithmetic operators even once, so I'd like to post it.

## Table of arithmetic operators

operator function Example Description
+(Unary plus operator) Positive number +x Specify a positive number. It does not change even if a code is added.
-(Unary minus operator) Sign inversion -x Invert the sign of the value of a.