LearnPy Hub
← Exceptions problems
Easy

Raise for a Bad Month

Write month_name(m) that raises ValueError('month must be 1-12') for a bad month and otherwise returns the name (January…). Read m, call it and print the name or the error message.

Input

One integer.

Output

One line.

Sample 1

Input
3
Output
March

Sample 2

Input
13
Output
month must be 1-12
solution.py
Output appears here
Raise for a Bad Month · Python practice problem · LearnPy Hub