The following rhyme helps us remember how many days there


The following rhyme helps us remember how many days there are in any given month:

Thirty days has September, April, June, and November,

All the rest have thirty-one,

Except February which has twenty-eight.

More accurate versions of the rhyme deal with the problem posed by the leap year, but let's ignore that for now. Write a function called days which expects one argument, the name of a month as a string, and returns the number of days in that month as given in the rhyme. Assume the argument passed to the function is a valid argument; do not validate the argument. Here are some examples of how your function should work:

>>> days("January")

31

>>> days("February")

28

>>> days("March")

31

>>> days("April")

30

>>>

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: The following rhyme helps us remember how many days there
Reference No:- TGS02511976

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)