LaunchCode logo
  1. Contents
  2. 11. Python Modules

11. Python ModulesΒΆ

  • 11.1. What are Modules?
    • 11.1.1. Why Use Modules?
    • 11.1.2. A List of Python Modules
    • 11.1.3. Check Your Understanding
  • 11.2. Importing Modules
    • 11.2.1. The import Keyword
      • 11.2.1.1. Find the Names of Module Items
    • 11.2.2. The from Keyword
    • 11.2.3. The as Keyword
    • 11.2.4. Try It!
  • 11.3. The random Module
    • 11.3.1. Generate a Random Number
      • 11.3.1.1. Not Really Random
    • 11.3.2. Select an Item from a Collection
    • 11.3.3. Random Turtle Walk
    • 11.3.4. Check Your Understanding
  • 11.4. The math Module
  • 11.5. Creating Modules
    • 11.5.1. Create a New Python File
    • 11.5.2. Setting Turtle Properties
      • 11.5.2.1. Create the turtle_prep Module
    • 11.5.3. File Locations
    • 11.5.4. Try It!
  • 11.6. The main() Event
    • 11.6.1. A Sample Program With One Module
    • 11.6.2. Loose Statements
    • 11.6.3. Add a main() Function
      • 11.6.3.1. Add main() to main.py
    • 11.6.4. Yes, You Really Want to Add main()
    • 11.6.5. Check Your Understanding
  • 11.7. More About main()
    • 11.7.1. Why Did We Do This?
    • 11.7.2. Wrapping Up
  • 11.8. Exercises: Modules
    • 11.8.1. Import Module Code
    • 11.8.2. Finish Coding A New Module
    • 11.8.3. Finish the Project
    • 11.8.4. Sanity check!
  • 11.9. Project: Collaborative Turtles Activity
    • 11.9.1. Introduction
    • 11.9.2. Goal
    • 11.9.3. Starter Code
    • 11.9.4. Activity
    • 11.9.5. Submit Your Work
    • 11.9.6. Bonus Task
  • ← 10.12. Project: Functions
  • 11.1. What are Modules? →

Back to top

Page Source