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
<iframe src="https://drive.google.com/file/d/1i7Tfc2Hz1DFr36Su3ZIqxw6E1B40a3i2/preview" width="640" height="480" allow="autoplay"></iframe>
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(...