Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed (UPI) Chapter 10: Mastering Python Modules!
Instruction
Importing a Module
Checkpoint: Importing Area
The module defined in area.py can be used in other programs. When importing the area module, the suffix .py is removed:
import area
print("Area of a basketball court:", area.rectangle(94, 50))
print("Area of a circus ring:", area.circle(21))
The output is:
Area of a basketball court: 4700
Area of a circus ring: 1385.4423602330987
Concepts in Practice: Import...