Question: Task 4 : The Time HeistTM ( 4 0 % of grade ) Create a function called dateRange which accepts three required positional parameters: start
Task : The Time HeistTM of grade
Create a function called dateRange which accepts three required positional parameters:
start str end str and step int
o This function will operate similarly to the builtin range function, but it will produce a list
of dates instead of integers.
o Both start and end will be strings in the format YYYYMMDD Use the
string.split method and int casts to convert both strings into separate year,
month, and day components.
o Call your offset function in a loop to build a list of each date starting with start,
moving in step increments, up to and excluding end.
o This function should return the list of date strings in the format YYYYMMDD
o Hint: to zeropad the month and the day when filling your list for example, to record
instead of use an fstring such as the following assuming year, month, and day are all defined variables:
fyearmonth:dday:d
Some example executions are provided below. More may be tested in Vocareum. Example execution :
dateRange
dateRange
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
