Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab03 - Exercise - Timetable In the lecture you were introduced to the date class and objects constructed from it. Python also comes with classes

image text in transcribed
image text in transcribed
Lab03 - Exercise - Timetable In the lecture you were introduced to the date class and objects constructed from it. Python also comes with classes for time, a time independent of a particular day, and datetime, a combination of a date and a time. Open timetable.py and complete the function timetable() according to its documentation. Write some tests in a new file you create called timetable_test.py. To receive full marks for this question you must achieve 100% coverage using coverage, as described in lectures. Please note: Coverage is not covered until the week 3 lectures, so you may not be able to complete part of this lab until then AWN timetable.py X 1 from datetime import date, time, datetime 3 def timetable(dates, times): 4 Generates a list of datetimes given a list of dates and a list of times. All possible combinations of date and time are contained within the result. The result is sorted in chronological order. For example, >>> timetable( [date(2019,9,27), date(2019,9,30). [time(14,10), time(10,30)]) datetime (2019,9,27, 10,30), datetime(2019,9,27,14,10), datetime (2019,9,30,10,30), datetime (2019,9,30, 14, 10) 5 6 7 8 9 10 11 pass

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions