Question: 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
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
Get step-by-step solutions from verified subject matter experts
