Summary
In this module, you learned how to write code that's reusable, organized, and easier to maintain.
You defined functions with the def keyword and passed data into them using positional, keyword, and default parameters. You returned single and multiple values with return, and saw the difference between returning a value and printing one. You explored how local and global scope work, and why keeping variables local makes code safer. Finally, you split code across multiple files and imported your own modules, then applied everything by building a calculator organized around functions.
Tip
You've reached the end of the Get Started with Python Programming learning path—nice work! Explore more Python content on Microsoft Learn to keep building your skills.