In this exercise you're going to write some code to help you cook a brilliant lasagna from your favorite cooking book.
You have four tasks, all related to the time spent cooking the lasagna.
Define the expected_bake_time constant that returns how many minutes the lasagna should bake in the oven.
According to the cooking book, lasagna needs to be in the oven for a total of 60 minutes.
julia> expected_bake_time
60Define the preparation_time function that takes the number of layers you added to the lasagna as an argument and returns how many minutes you spent preparing the lasagna, assuming each layer takes you 2 minutes to prepare.
julia> preparation_time(4)
8Define the remaining_time function that takes the actual minutes the lasagna has been in the oven as a parameter and returns how many minutes the lasagna still has to remain in the oven.
julia> remaining_time(50)
10Define the total_working_time function that takes two arguments: the first argument is the number of layers you added to the lasagna, and the second argument is the number of minutes the lasagna has been in the oven.
The function should return how many minutes in total you've worked on cooking the lasagna, which is the sum of the preparation time in minutes, and the time in minutes the lasagna has spent in the oven at the moment.
julia> total_working_time(3, 20)
26In this exercise you're going to write some code to help you cook a brilliant lasagna from your favorite cooking book.
You have four tasks, all related to the time spent cooking the lasagna.
Define the expected_bake_time constant that returns how many minutes the lasagna should bake in the oven.
According to the cooking book, lasagna needs to be in the oven for a total of 60 minutes.
julia> expected_bake_time
60Define the preparation_time function that takes the number of layers you added to the lasagna as an argument and returns how many minutes you spent preparing the lasagna, assuming each layer takes you 2 minutes to prepare.
julia> preparation_time(4)
8Define the remaining_time function that takes the actual minutes the lasagna has been in the oven as a parameter and returns how many minutes the lasagna still has to remain in the oven.
julia> remaining_time(50)
10Define the total_working_time function that takes two arguments: the first argument is the number of layers you added to the lasagna, and the second argument is the number of minutes the lasagna has been in the oven.
The function should return how many minutes in total you've worked on cooking the lasagna, which is the sum of the preparation time in minutes, and the time in minutes the lasagna has spent in the oven at the moment.
julia> total_working_time(3, 20)
26