Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started