From 21e9de3296a04f91fef6af94bb281d058b8c763e Mon Sep 17 00:00:00 2001 From: "exercism-solutions-syncer[bot]" <211797793+exercism-solutions-syncer[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 15:41:29 +0000 Subject: [PATCH] [Sync Iteration] go/lasagna/1 --- solutions/go/lasagna/1/lasagna.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 solutions/go/lasagna/1/lasagna.go diff --git a/solutions/go/lasagna/1/lasagna.go b/solutions/go/lasagna/1/lasagna.go new file mode 100644 index 0000000..59d12e9 --- /dev/null +++ b/solutions/go/lasagna/1/lasagna.go @@ -0,0 +1,18 @@ +package lasagna + +// TODO: define the 'OvenTime' constant +const OvenTime int = 40 +// RemainingOvenTime returns the remaining minutes based on the `actual` minutes already in the oven. +func RemainingOvenTime(actualMinutesInOven int) int { + return OvenTime - actualMinutesInOven +} + +// PreparationTime calculates the time needed to prepare the lasagna based on the amount of layers. +func PreparationTime(numberOfLayers int) int { + return numberOfLayers * 2 +} + +// ElapsedTime calculates the time elapsed cooking the lasagna. This time includes the preparation time and the time the lasagna is baking in the oven. +func ElapsedTime(numberOfLayers, actualMinutesInOven int) int { + return PreparationTime(numberOfLayers) + actualMinutesInOven +}