Question: Your task here is to write a Python function that calculates the year ( as an integer ) one must be born by to have
Your task here is to write a Python function that calculates the year as an integer one must be born by to have lived through some fraction of all emissions, either land, fossil, or both.
Make a Python function named whatyear that takes two named arguments, fraction, for the fraction of cumulative CO
we are interested in and source, which can take on string values 'Fossil', 'Land', or 'Both'. Give defaults of and Both for these arguments. Thus, you should declare your function like so:
def whatyearfraction source 'Both':
This function should return the latest year one could be born in such that fraction of all CO
from the indicated source was emitted in one's lifetime. So for example, whatyearfraction source 'Both' should return
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
