Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write only the Python program for this problem. Classified traffic count Traffic count at a road location means the number of vehicles moving at that

image text in transcribed
Write only the Python program for this problem. Classified traffic count Traffic count at a road location means the number of vehicles moving at that location. Classified count means number of vehicles of each type of vehicle (Example: Motorcycles 200, Cars: 50, Autos 100... Write a program that takes input for traffic count and processes it. Organize your program into Main program, and two functions. The two separate functions do the following Function1: Input function: Takes input for number of vehicle types (N) Takes input of the vehicle types with two/three letter code wordslex: "MC","CAR" "AU-it stores these in a List Give this list a name Takes input of the count for each vehicle type in the same order it stores these in a second list. Give this list a name . Function2: Summary function: . Calculates the total count ie. the sum of counts of all vehicle types Calculates the percent share of each vehicle type in total count and store it in separate list. Percent share means: For example, there are 200 motorcycles and the total count is 1000. The share is 200/1000*100=20 Prints the percent shares of all vehicle types. If you have time do this: Now, asks the user what data the user wants 1: total volume. 2. count for one vehicle type or 3 percent share for one vehicle type. Then depending on what the user wants the program prints the data . Example: Input: Vehicle Types: 3 Type 1: MC Count 1: 200 Type 2. CAR Count 2: 50 Type 3: AU Count 3: 100 Output Percent share of vehicle types: MC 57.1% CAR: 1439 AU 28.6%

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_2

Step: 3

blur-text-image_3

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 Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

Students also viewed these Databases questions

Question

Describe how managers can build trust.

Answered: 1 week ago