Skip to main content

Practice · 2 of 3

Import Your Own

CHALLENGE
Difficulty: beginner+25 XP

Create two-module structure in ONE source: define area(r) (circle area, using 3.14159) inside a simulated module namespace... actually simpler: define area(r) and a main() that prints area(2) — but call main() ONLY under an if __name__ == "__main__": guard. The grader imports your definitions without running main(); printed must be EMPTY.

Back to lesson: Practice: Import & Module Drills