Define area(w, h) returning w * h
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
Problem
Define area(w, h) returning w * h. Compute room1 = area(10, 12) and room2 = area(8, 9). Print 'Total: ' followed by their sum.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.