Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON We set up a project to count the number of cars passing my front yard each hour. A snippet of the data looks like

PYTHON

We set up a project to count the number of cars passing my front yard each hour.

A snippet of the data looks like this:

data = [ (2,"12/21/2017 21:30"), (8,"12/21/2017 22:30"), (1,"12/22/2017 00:30"), (1,"12/22/2017 01:30"), . . . (8,"12/31/2017 21:30"), (1,"12/31/2017 22:30"), ]

There is a list element for each day and hour combination, and the elements of that list are a tuple that pairs the number of cars with the date and time. The whole list is contained within the square brackets [ and ], and each tuple appears within parentheses, ( and ).

Your task is to code a bit of Python to iterate through the data provided, and draw a text-mode bar chart with lines like this:

12/31/2017 01:30 * 12/31/2017 09:30 ****** 12/31/2017 10:30 ********** 12/31/2017 11:30 **************

Of course yours will have many more lines, but each line will look similar to this: the date and time string, followed by a space, followed by the number of asterisks corresponding to the count in the tuple for that date time.

The py file is linked below with the data:

https://drive.google.com/file/d/1E8SNQTZL9C8rNXiqiskgfZz0aA3c4zNE/view?usp=sharing

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

Students also viewed these Databases questions

Question

1. The evaluation results can be used to change the program.

Answered: 1 week ago

Question

5. To determine the financial benefits and costs of the program.

Answered: 1 week ago