Responses for exercises in Exercism.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2.2 KiB

Hints

General

1. Define expected bake time in minutes

  • You need to name a constant, and assign it an integer value.

2. Calculate remaining bake time in minutes

3. Calculate preparation time in minutes

  • You need to define a function with a single parameter representing the number of layers.
  • Use the mathematical operator for multiplication to multiply values.
  • You could define an extra constant for the time in minutes per layer rather than using a "magic number" in your code.
  • This function should return a value.

4. Calculate total elapsed cooking time (prep + bake) in minutes

  • You need to define a [function][defining-functions] with two parameters.
  • Remember: you can always call a function you've defined previously.
  • You can use the mathematical operator for addition to sum values.
  • This function should return a value.

5. Update the recipe with notes