From 5e9f496665f012bfe040660021242161b73b4cc6 Mon Sep 17 00:00:00 2001 From: Metallifax Date: Sat, 12 Mar 2022 13:55:58 -0400 Subject: [PATCH 1/3] [Lasagna]: Added a module level docstring --- exercises/concept/guidos-gorgeous-lasagna/.meta/exemplar.py | 5 +++++ exercises/concept/guidos-gorgeous-lasagna/lasagna.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/exercises/concept/guidos-gorgeous-lasagna/.meta/exemplar.py b/exercises/concept/guidos-gorgeous-lasagna/.meta/exemplar.py index 1f1bcdd2fc..88ab3d5c54 100644 --- a/exercises/concept/guidos-gorgeous-lasagna/.meta/exemplar.py +++ b/exercises/concept/guidos-gorgeous-lasagna/.meta/exemplar.py @@ -1,3 +1,8 @@ +"""Functions used in preparing Guido's gorgeous lasagna. + +Learn about Guido, the creator of the Python language: https://en.wikipedia.org/wiki/Guido_van_Rossum +""" + # time the lasagna should be in the oven according to the cookbook. EXPECTED_BAKE_TIME = 40 PREPARATION_TIME = 2 diff --git a/exercises/concept/guidos-gorgeous-lasagna/lasagna.py b/exercises/concept/guidos-gorgeous-lasagna/lasagna.py index 161a0b247d..290bd53f31 100644 --- a/exercises/concept/guidos-gorgeous-lasagna/lasagna.py +++ b/exercises/concept/guidos-gorgeous-lasagna/lasagna.py @@ -1,3 +1,8 @@ +"""Functions used in preparing Guido's gorgeous lasagna. + +Learn about Guido, the creator of the Python language: https://en.wikipedia.org/wiki/Guido_van_Rossum +""" + # TODO: define the 'EXPECTED_BAKE_TIME' constant # TODO: consider defining the 'PREPARATION_TIME' constant # equal to the time it takes to prepare a single layer From 20fdd2418255ca65caa2dbc1637ee003f83a61f1 Mon Sep 17 00:00:00 2001 From: Metallifax Date: Sat, 12 Mar 2022 13:57:21 -0400 Subject: [PATCH 2/3] [Lasagna]: corrected under-indentation in exemplar --- .../guidos-gorgeous-lasagna/.meta/exemplar.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/concept/guidos-gorgeous-lasagna/.meta/exemplar.py b/exercises/concept/guidos-gorgeous-lasagna/.meta/exemplar.py index 88ab3d5c54..57a2dd6279 100644 --- a/exercises/concept/guidos-gorgeous-lasagna/.meta/exemplar.py +++ b/exercises/concept/guidos-gorgeous-lasagna/.meta/exemplar.py @@ -11,13 +11,13 @@ def bake_time_remaining(elapsed_bake_time): """Calculate the bake time remaining. - :param elapsed_bake_time: int baking time already elapsed - :return: int remaining bake time (in minutes) derived from 'EXPECTED_BAKE_TIME' + :param elapsed_bake_time: int baking time already elapsed + :return: int remaining bake time (in minutes) derived from 'EXPECTED_BAKE_TIME' - Function that takes the actual minutes the lasagna has been in the oven as - an argument and returns how many minutes the lasagna still needs to bake - based on the `EXPECTED_BAKE_TIME`. - """ + Function that takes the actual minutes the lasagna has been in the oven as + an argument and returns how many minutes the lasagna still needs to bake + based on the `EXPECTED_BAKE_TIME`. + """ return EXPECTED_BAKE_TIME - elapsed_bake_time From c8d4c4f34dc9e4ca939a8634228788e14327fc69 Mon Sep 17 00:00:00 2001 From: Metallifax Date: Fri, 18 Mar 2022 23:26:58 -0300 Subject: [PATCH 3/3] [Lasagna]: Inserted dashes in all docstrings Dashes added to both exemplar and stub files Removed a space on line 43 in exemplar.py Consistency change on lines 45-47 -- column width ~90 compared to 112 --- .../guidos-gorgeous-lasagna/.meta/exemplar.py | 19 ++++++++++--------- .../guidos-gorgeous-lasagna/lasagna.py | 4 ++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/exercises/concept/guidos-gorgeous-lasagna/.meta/exemplar.py b/exercises/concept/guidos-gorgeous-lasagna/.meta/exemplar.py index 57a2dd6279..6d3588f9c7 100644 --- a/exercises/concept/guidos-gorgeous-lasagna/.meta/exemplar.py +++ b/exercises/concept/guidos-gorgeous-lasagna/.meta/exemplar.py @@ -11,8 +11,8 @@ def bake_time_remaining(elapsed_bake_time): """Calculate the bake time remaining. - :param elapsed_bake_time: int baking time already elapsed - :return: int remaining bake time (in minutes) derived from 'EXPECTED_BAKE_TIME' + :param elapsed_bake_time: int - baking time already elapsed + :return: int - remaining bake time (in minutes) derived from 'EXPECTED_BAKE_TIME' Function that takes the actual minutes the lasagna has been in the oven as an argument and returns how many minutes the lasagna still needs to bake @@ -25,8 +25,8 @@ def bake_time_remaining(elapsed_bake_time): def preparation_time_in_minutes(number_of_layers): """Calculate the preparation time. - :param number_of_layers: int the number of lasagna layers made - :return: int amount of prep time (in minutes), based on 2 minutes per layer added + :param number_of_layers: int - the number of lasagna layers made + :return: int - amount of prep time (in minutes), based on 2 minutes per layer added This function takes an integer representing the number of layers added to the dish, calculating preparation time using a time of 2 minutes per layer added. @@ -38,12 +38,13 @@ def preparation_time_in_minutes(number_of_layers): def elapsed_time_in_minutes(number_of_layers, elapsed_bake_time): """Calculate the elapsed time. - :param number_of_layers: int the number of layers in the lasagna - :param elapsed_bake_time: int elapsed cooking time - :return: int total time elapsed (in in minutes) preparing and cooking + :param number_of_layers: int - the number of layers in the lasagna + :param elapsed_bake_time: int - elapsed cooking time + :return: int - total time elapsed (in in minutes) preparing and cooking - This function takes two integers representing the number of lasagna layers and the time already spent baking - and calculates the total elapsed minutes spent cooking the lasagna. + This function takes two integers representing the number of lasagna layers and the + time already spent baking and calculates the total elapsed minutes spent cooking the + lasagna. """ return preparation_time_in_minutes(number_of_layers) + elapsed_bake_time diff --git a/exercises/concept/guidos-gorgeous-lasagna/lasagna.py b/exercises/concept/guidos-gorgeous-lasagna/lasagna.py index 290bd53f31..34d750a3f9 100644 --- a/exercises/concept/guidos-gorgeous-lasagna/lasagna.py +++ b/exercises/concept/guidos-gorgeous-lasagna/lasagna.py @@ -12,8 +12,8 @@ def bake_time_remaining(): """Calculate the bake time remaining. - :param elapsed_bake_time: int baking time already elapsed. - :return: int remaining bake time derived from 'EXPECTED_BAKE_TIME'. + :param elapsed_bake_time: int - baking time already elapsed. + :return: int - remaining bake time derived from 'EXPECTED_BAKE_TIME'. Function that takes the actual minutes the lasagna has been in the oven as an argument and returns how many minutes the lasagna still needs to bake