[Tutor] Question

Alan Gauld alan.gauld at yahoo.co.uk
Thu Apr 9 04:43:44 EDT 2020


On 09/04/2020 07:03, Peter Jennings wrote:
> 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)

Can you read that dataset one line at a time into a tuple?

> 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, the time of the day and the season> and if any input parameter is incorrect the function returns INVALID
in all outputs.

Can you create such a function?

And, although you don't explicitly say that you need to,
can you call the function using data selected from your input tuples?

Finally, what are you expected to output? Another file perhaps?
In the format of your function output?
Do you know how to do that?

> I’ve attached the question to see if you had any pointers. 

This is a text only list so any non text attachments get
stripped by the server.


Tell us which parts you are having problems with.
Show us the code you have so far.
Explain what's wrong(include any error messages)

We will try to help you reach your goal.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list