Modules and Libraries/Calling Functions

--Originally published at Python & pugs

library.gif

Python 3 have so many libraries that you can use when you need them, and you just need to call for them in your program, and in this post I’ll give an example with “math” because is the easiest one (lol).

To make use of the math library you just need to “call” for it:
libraries
So the only to do here is to import the library you want to use, the print whatever you want of the library.
In here you can find all the libraries Python 3 can offer you:
https://docs.python.org/3/library/

but-wait

<THE CREATION OF YOUR OWN PEYOTE (Library)>

To create your own library, you need to make another file where you are going to create a function.

librariesfunction

Now that you have this function, you’ll import it to another file where it is going to run with the number you assign to x.

librariesfunction

And now you made two mastery topics in one!

snoop-dogg-gggggga721eb54a9-290x595x58.gif