# CSCA08 Lecture 4: CSC108 - Week 4 Notes

## Document Summary

Most python functions are saved into different modules (not available as built-in) and you have to tell python that you want to use them. You can save your own functions into modules: module: a le containing function de nitions and other statements, for example, there is a math module in python that contains math-related functions (like square root, or sqrt(number)). Import math tells python that you want to access the module. It creates a variable called math that refers to the module object that contains the various math functions. Dir(math) lists all of the functions associated with math. One of them is sqrt(): however, we need to specify that it is from the math module. Method: a function inside of an object. We can produce new strings based on old strings using str methods: eg. if we type white_rabbit = i"m late! The method lower() created a new string based on the original string.