Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please Use python How do you convert the 2nd part into a Module that you can import and use in the coding solution? Thank you!
Please Use python
How do you convert the 2nd part into a Module that you can import and use in the coding solution?
Thank you!
Donation Amount Responsible Coding Function Name: donation_amount() Parameters: list of donations ( list) Returns: total ( float) Description: With the recent wildfires in Australia, more than 17.9 million acres have been burned across the country's six states. Thousands of homes have been destroyed and an es- timated one billion animals have suffered the wrath of the fires. Opportunities of donation and international aid have helped Australia's forces combat this climate disaster. Write a function that takes in a list of donation amounts and calculates the total of all dona- tions. You will need to call the function from the provided Python file, and pass in each of the donation amounts as arguments. The donation amounts in the list will be strings, but the pro- vided python file will contain a function that will return an addable number. If you do not use the function in convert.py to solve this function then you will not receive credit for this function. >>> donations = ["$13.45", "$32.00", "$100.00", "$10.50"] >>> print (donation_amount (donations)) 155.95 >>> donations = ["$10", "$5", "$1", "$15"] >>> print (donation_amount (donations)) 31.0 def conversion(aStr): aStr = a Str[1:] final = float(aStr) return finalStep 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