Answered step by step
Verified Expert Solution
Link Copied!

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

  1. 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

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions