[Tutor] Question

Joel Goldstick joel.goldstick at gmail.com
Thu Apr 9 04:38:22 EDT 2020


On Thu, Apr 9, 2020 at 4:06 AM Peter Jennings
<peterjennings1999 at gmail.com> wrote:
>
> 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
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

Welcome.

This list doesn't allow attachments.  Cut and paste a single line of
your data set here.  What is it that you know how to do?  Have you
written code to read the data set?  How have you decided to store the
data?  For instance, using a list of dictionaries?

If you can write the code to read the data set you are well on your
way.  If you can write code to input the parameters asked for, you are
further on your way.  Try those tasks and come back with your code and
your next question(s).

Good luck

-- 
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays


More information about the Tutor mailing list