Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Design the function create_lodates that takes a list month names, a list of days as whole numbers and a list of years as whole numbers.
Design the function create_lodates that takes a list month names, a list of days as whole numbers and a list of years as whole numbers. The function should create and return a list of of date information tuples (as described in specification 3) constructed using the values in the given lists. Example: If the function is called with the following 3 lists: ['January', 'June'], [20, 10] and [1987, 2020] it should return the list: [(1987, 'January', 20), (2020, 'June', 10)] The order of the dates in the returned list must correspond to the order of the values in the given lists. The function should assume the given lists are all of equal length and that the values in the given lists combine to make valid dates. Design the function contains_month that takes a list of date information tuples (as described in specification 3) and an additional argument the specifies a valid month. The function should return True if any of the dates in the given list are in the given month, and False otherwise. The function should assume the second argument is a valid month in the Gregorian calendar (our Calendar) and the initial letter is capitalized and no abbreviations are used
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