Question: Python Create a function named monthDays with a parameter of tup. Within the function, create a loop that goes through the months tuple. One each
Python
- Create a function named monthDays with a parameter of tup. Within the function, create a loop that goes through the months tuple. One each iteration, test these: If the iteration holds the strings January or March, print that month name and then " has 31 days". If the iteration holds the month February, print that month name and then " has 28 days". If the iteration holds the month April, print that month name and then " has 30 days". Outside of the function, create a tuple called months that holds the strings: January, February, March, April. Now pass the tuple into a function call for monthDays.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
