Write a function called ReservoirInfo which takes information about reservoir storage as the inputs and outputs...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a function called ReservoirInfo which takes information about reservoir storage as the inputs and outputs a statement: 'In [Month Name], [Reservoir Name] held [Volume] acre-feet of water.' where the words in brackets are the name of the input month, reservoir name, and storage volume, respectively. The function arguments should be: name : reservoir's name as a string, exactly as it appears in reservoir_names • month : integer representing the month number, where 1 corresponds to January, 2 corresponds to February, etc. Be careful with your string formatting. Any small modification, such as extra space or character, will result in a failed test. You should name the function arguments name and month. An example function call and its output are: >>>ReservoirInfo(name = 'Lake Oroville', month= 1) 'In January, Lake Oroville held 1642000 acre-feet of water.' Important notes: •. Your function should return the statement • [Month Name] should be the full month name of the input number. You may find the calendar.month_name[number]. attribute helpful. To use it, you have to import the module calendar first. • [Volume] should be obtained from reservoir_data based on the corresponding input month and reservoir name. You may find the list index() method helpful (returns the index of the specified element in the list). Note that [Volume] should be an integer and not float. Activate Windows Write a function called ReservoirInfo which takes information about reservoir storage as the inputs and outputs a statement: 'In [Month Name], [Reservoir Name] held [Volume] acre-feet of water.' where the words in brackets are the name of the input month, reservoir name, and storage volume, respectively. The function arguments should be: name : reservoir's name as a string, exactly as it appears in reservoir_names • month : integer representing the month number, where 1 corresponds to January, 2 corresponds to February, etc. Be careful with your string formatting. Any small modification, such as extra space or character, will result in a failed test. You should name the function arguments name and month. An example function call and its output are: >>>ReservoirInfo(name = 'Lake Oroville', month= 1) 'In January, Lake Oroville held 1642000 acre-feet of water.' Important notes: •. Your function should return the statement • [Month Name] should be the full month name of the input number. You may find the calendar.month_name[number]. attribute helpful. To use it, you have to import the module calendar first. • [Volume] should be obtained from reservoir_data based on the corresponding input month and reservoir name. You may find the list index() method helpful (returns the index of the specified element in the list). Note that [Volume] should be an integer and not float. Activate Windows
Expert Answer:
Answer rating: 100% (QA)
Heres a Python function called ReservoirInfo that takes the reservoirs name and the month as input p... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
The City of Grinders Switch maintains its books in a manner that facilitates the preparation of fund accounting statements and uses worksheet adjustments to prepare government-wide statements. 1....
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
What product drove the most ecommerce purchases in October 2022? There was a spike in users on October 12, 2022. Looking at the Google Analytics 4 data, what was the likely cause of this spike in...
-
In Problems 4358, (a) Find the vertex and the axis of symmetry of each quadratic function, and determine whether the graph is concave up or concave down. (b) Find the y-intercept and the...
-
In an injection-molding operation, the length and width, denoted as X and Y, respectively, of each molded part are evaluated. Let A denote the event of 48 = X = 52 centimeters B denote the event of 9...
-
A small object oscillates back and forth at the bottom of a frictionless hemispherical bowl, as the drawing illustrates. The radius of the bowl is R, and the angle u is small enough that the object...
-
Repeat Problem 8.117 if the friction factors are not known, but the pipes are steel pipes. Problem 8.117 With the valve closed, water flows from \(\operatorname{tank} A\) to \(\operatorname{tank} B\)...
-
Kinzie Co. sold $3,000,000, 9%, 5-year bonds on January 1, 2010. The bonds were dated January 1, 2010, and pay interest on January 1. The company uses straight-line amortization on bond premiums and...
-
Applied vs. Actual Manufacturing Overhead Davis Manufacturing Corporation applies manufacturing overhead on the basis of 150% of direct labor cost. An analysis of the related accounts and job order...
-
Sendelbach Corporation is a U.S.-based organization with operations throughout the world. One of its subsidiaries is headquartered in Toronto. Although this wholly owned company operates primarily in...
-
Zero Corp's total common equity at the end of last year was $350,000 and its net income was $70,000. What was its ROE?
-
Do not focus on a single business or industry. Research how the business disciplines work together to ensure corporate/organizational strategy is implemented so the entity can move forward. Use...
-
1. Do the principles of psychological egoism account for the behavior we see exhibited by the characters in this film? 2. Contrast the characters of Terry Malloy (Marlon Brando) and Johnny Friendly...
-
17. (5 points) On 12-31-20 J entered into an agreement allowing J to collect the following: Starting 12-31-21, $500 every 12-31 until 2025. On 12-31-26, a one-time collection of $2,500. Nothing in...
-
What does one do to obtain funding for a new invention, movie, or company? Do you go to the bank? Do you go to venture capitalists? Do you go to angel investors? Crowd Funding is an alternative to...
-
Do you believe your organisation has a planned approach to career management? Motivate your answer What ought your employer do to manage your career? What ought you do yourself to contribute to your...
-
XYZ Company is evaluating an investment project. The project involves establishing a new facility to assemble medical equipment in a sparsely populated area of northern Newfoundland and Labrador in...
-
Splitting hairs, if you shine a beam of colored light to a friend above in a high tower, will the color of light your friend receives be the same color you send? Explain.
-
John Fuji (age 37) moved from California to Washington in December 2011. He lives at 468 Cameo Street, Yakima, WA 98901. John's Social Security number is 571-78-5974 and he is single. His earnings...
-
Jerry made the following contributions during 2012: His synagogue (by check).....................................................$680 The Democratic Party (by check)...
-
Mike sells his home to Jane on April 2, 2012. Jane pays the property taxes covering the full calendar year in October, which amount to $2,500. How much may Mike and Jane each deduct for property...
-
Is it always possible to discern a trend in any time-series data? What problems might arise if trends are apportioned to time-series data that are not really present?
-
Why might household and firms confidence and expectations change leading to deviations in output from trend? Is there any way in which changes in confidence can be measured to provide an indicator of...
-
Firms experience a rise in stocks. Explain why this might have occurred and what you expect firms response to this event might be and how this might affect output.
Study smarter with the SolutionInn App