LearnPy Hub
← Decorators problems
Medium

Validate Arguments

Write a decorator positive that raises ValueError if any argument is negative. Decorate area(w, h); read w and h and print the area or invalid.

Input

Two integers.

Output

One line.

Sample 1

Input
3
4
Output
12

Sample 2

Input
-1
4
Output
invalid
solution.py
Output appears here
Validate Arguments · Python practice problem · LearnPy Hub