[Tutor] Question

Peter Jennings peterjennings1999 at gmail.com
Thu Apr 9 02:03:59 EDT 2020


Hey Guys, 

I’m relatively new to Python and I have to complete a coding unit with my University course. 

I’ve been struggling to complete this question I have been given. Essentially, we got an extensive Dataset on car crashes which has a number of columns (index, age, year, crash month, crash day, crash time, road user, gender, crash type) and thousands of data records. I have to create a function which inputs four variables; crash month, crash day, crash time and year and outputs a day of the week Monday - Sunday, the time of the day characterised into Morning, Afternoon, Evening and Night and the season and if any input parameter is incorrect the function returns INVALID in all outputs. I was wondering if you had any advice on this, I’m really struggling. I’ve attached the question to see if you had any pointers. 

Thanks, 
Peter 



More information about the Tutor mailing list