Skip to main content

11.10) Exercise 32 - Sea Level Rise Function


Sea level rise function:

  • Do the Sea-level Rise challenge, if you haven’t done it yet (Part 1)
  • Turn the program into a function with the following arguments and return value:

Arguments

  • volume of the ice sheet, with a default value of 2.93 10^15 m^3
  • fraction of ice sheet that melts, with a default value of 1.0

Return value:

  • Sea level rise in m
  • Call the function with no argument
  • Call the function to calculate the sea level rise that would occur if the entire Antarctic ice sheet melts (the volume of the Antarctic ice sheet is 26 10^15 m^3)
  • Call the function to calculate the sea level rise if 1% of the Antarctic ice sheet was to melt
  • Solution: sea_level_rise_function.py