Homework 3: Muni ridership calculator
Objective: To perform a simple calculation based on user input
Write a program that asks the user for survey data about Muni riders, and outputs a summary of that data.
Your program should first ask the user which Muni line was surveyed. Then the program asks the user how
many days the survey was conducted, and then enter the number of riders that were
counted. Your program divides the number of riders by the number of days and outputs the
resulting average daily ridership. The number of digits of precision is not important.
Your program should behave like shown below (It should not output "Running the program a second time". That's just my way of telling you I'm showing sample output from two different times of running the same program.)
Sample Output:
Welcome to the Muni Ridership Calculator.
Which Muni line did you survey? K Ingleside
How many days did you survey it? 5
How many rider did you count? 123456
According to your survey, an average of 24691.2
people rode the K Ingleside per day.
----- Running the program a second time ------
Welcome to the Muni Ridership Calculator.
Which Muni line did you survey? 24 Divisadero
How many days did you survey it? 3
How many rider did you count? 10000
According to your survey, an average of 3333.3333333333335
people rode the 24 Divisadero per day.
Rules
- Make sure to put a comment at the top of your program with your name, the name of this assignment and class (110A Homework 3), and a brief description of what the program does.
- Make sure to compile and run your program (using repl.it or the compiler of your choice),
and then submit the Python source code and at least two test runs (sample output such as above) showing how your program worked with different inputs.
Follow the instructions given in class and in the
Computer Access and Homework Instructions
- Make sure to submit your homework on Canvas, on the
Assignment page for Homework 3.