Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Midgard encounters the problem of inclement weather. This year the Meteorological Department forecasts that there will be n cubic units of rain in the Midgard

Midgard encounters the problem of inclement weather. This year the Meteorological Department forecasts that there will be n cubic units of rain in the Midgard area.
Midgard has area height information in the form of an array [ h], where each h indicates the area's height.
Find the height of the water level from the point with the lowest surface.
With,
Input 1 : Rainfall amount
Input 2 : Midgard floor height information.
Note :
1. The water surface will be at the same height at every point.
Example :
a. Input1 : 11
Input 2 : [3,5,4,5,2]
Output : 4.00
B. Input1 : 5
Input 2 : [1,4,3,6]
Output : 3.33
C. Input 1 : 5
Input 2 : [1,2,4,2,3]
Output : 2.25
Write the solution in python code.

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

Successful Keyword Searching Initiating Research On Popular Topics Using Electronic Databases

Authors: Randall MacDonald, Susan MacDonald

1st Edition

0313306761, 978-0313306761

More Books

Students also viewed these Databases questions