Aswini S.

asked • 05/16/20

Programming sedimentation app

Programming - Sedimentation App 1.1 Problem Statement The figure below shows a lake within which sediment, suspended in the water, rains down and slowly builds up on the lake floor. Obviously the early deposits will be covered by the later ones. This results in a relationship between depth below lake bed and time since deposition; the deeper you go the older the sediments get. Now, if the rate at which sediments settle upon the floor is approximately constant, sediments buried 2 meters below the lake bed are twice as old as sediments buried by 1 meter and sediments buried by 3 meters are three times as old and so on. Thus, if you double the depth, you double the age, if you triple the depth you triple the age and so on. This means that the sediment age is proportional to burial depth. This can be formulated by the following mathematical equation; Y = K x D ................................................. (1) Where, Y denotes the age, K denotes a constant and D denotes the depth. 1.2 Problem to be Solved For all values of K between 1000 year/meter till 10,000 year/meter in increments of 1000 years/meter, calculate, the age of the sediments at a depth of 2 meters, 4 meters, 5.5 meters, and 10 meters. For each rate K you must display the depth of the sediment and the respective age of the sediment.

Task1: Write an algorithm to solve the problem mentioned above. Your algorithm must have a nested loop i.e., there should be an inner loop and an outer loop. This should be written as pseudocode and added as comments in your python file.

Task 2: Translate your algorithm into a Python program. The python implementation must have try ... except block to catch the runtime errors to make the program safe from any unwanted crashes.

1.2.2 Use of Functions in Assignment: It is necessary that you implement this assignment using functions. To obtain the maximum score you must demonstrate some ability to create and use functions of your own.

1.3 Important Note: In your program you must write comments where necessary. Don't write comments for obvious code, but segments of code which seem complex.


1 Expert Answer

By:

Patrick B. answered • 05/16/20

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.