Answered step by step
Verified Expert Solution
Link Copied!

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!

image text in transcribedimage text in transcribed

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 final

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

Step: 3

blur-text-image

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

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions

Question

Discuss the steps in the development planning process. page 399

Answered: 1 week ago

Question

Identify the cause of a performance problem. page 380

Answered: 1 week ago