Question: My code below is returning an erro and I am unsure of how it needs to be fixed. I can only use the library that
My code below is returning an erro and I am unsure of how it needs to be fixed. I can only use the library that has been imported which is datetime. I am to implement the function based on the specification.
import datetime
def iso_str(d,t): """ Returns the ISO formatted string of data and time together. When combining, the time must be accurate to the microsecond. Parameter d: The month-day-year Precondition: d is a date object Parameter t: The time of day Precondition: t is a time object """ # HINT: Combine date and time into a datetime and use isoformat day = datetime.datetime(d,t) return day.isoformat()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
