Question
Using python programming Write a program t hat is able to calculate how much money will be raised during a charity run, by asking the
Using python programming Write a program t hat is able to calculate how much money will be raised during a charity run, by asking the user how many pledges they secured, how much money each of the pledges was for, and how many miles they c overe d . Donations work on a per m ile basis: someone pledges to pay a specific amount for each m ile c overed . The more m ile s , the more money in donations. Yo ur need to create a program that does the following , in this exact order :
1. Get the n umber of donations 2. Get the v alue of each donati on 3. Get the n umber of m ile s 4. Calculate and display the t otal amount donated to charity A s the program asks the user for the value of each pledge, it m ust print out the number of the pledge , so they don t lose track of which one they are on (see the sample output) . Here is some sample output, with the user input in blue . (Yours does not have to match this word for word, but it should be similar.)
bash - 4.1$ python hw3_part4.py How many pledges did you secure? 5
For pledge # 1
H ow much money was pledged? 10
For pledge # 2 H ow much money wa s pledged? .25
For pledge # 3 H ow much money was pledged? 9.99
For pledge # 4 H ow much money was pledged? 8
For pledge # 5 H ow much money was pledged? 20
How many miles did you run for charity? 201
Based on your 201 miles you earned $ 9696.24 for the charity.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started