I’m having quite the time trying to solve Task 4 in Guido’s Gorgeous Lasagna and can’t seem to figure out where I’m going wrong. My current iteration looks like the following:
def elapsed_time_in_minutes(number_of_layers, elapsed_bake_time): total_preparation_time = number_of_layers * PREPARATION_TIME total_elapsed_time = EXPECTED_BAKE_TIME - elapsed_bake_time elapsed_time_in_minutes = total_preparation_time + total_elapsed_time return(elapsed_time_in_minutes)
And while I struggled with Tasks 2 & 3 as well, enough proverbial banging of my head against the wall (on constant revisiting of the hints) helped me to finally code the following:
EXPECTED_BAKE_TIME = 40 def bake_time_remaining(elapsed_bake_time): return(EXPECTED_BAKE_TIME - elapsed_bake_time) def preparation_time_in_minutes(number_of_layers): PREPARATION_TIME = 2 preparation_time_in_minutes = number_of_layers * PREPARATION_TIME return(preparation_time_in_minutes)
The reason I’m sharing everything is my assumption that all of it is required to successfully the test run.
What am I missing with all of this?
As an aside, am the only one to have difficulty interpreting what the instructions are asking of me? I’d like to consider myself able to visualize and extract concepts from text, yet these instructions seem unncessarily complex to me.