In this article, I will talk about how to create a program with functions.
First, you need to import the math library.

16425701_1515214925170195_1337098460_n

After we need to wrote the functions to use , at the end of declaring the functions  you will have to put return the value, in this case, you need 2:

def square_root(x): (to make square root)

16426451_1515212411837113_1369144925_n

def cube_root(x): (to make the cube root)

16426451_1515212411837113_1369144925_n

We have to ask the user what is the number to assess, at the same time declaring it as a variable.

16468782_1515212401837114_1824257549_n

Then you have to place an if ,in case the user decides to provide a negative number, which the program not explote.

16467151_1515214861836868_1886379236_n

For the end you need to print  the results that gives to the operations and the programhave to mention  «The program cannot handle negative numbers» if the user provide a negative number

16465926_1515214848503536_467170217_o

These are the results.

16466148_1515246268500394_289080278_o