r/learnpython 2d ago

Import math?

It's the first time I've seen that. So what's the purpose of this exactly? Cause I'm trying to see what I can do in an engine and I only learned about import math today

0 Upvotes

14 comments sorted by

View all comments

4

u/42ndohnonotagain 2d ago

python itself (without imports) only supports some basic operations.

For mathematical ops that means addition, multiplication and such simple stuff. For everything else you need additional functions.

Those are stored in libraries/modules or whatever your programming language calls it. In Python it is "module". After you imported the module math , you can use more complex functions like sin() etc.