Skip to content

Commit 2bd4d41

Browse files
committed
Revert "Changed wording of task 4 and added notes about magic numbers in stub file and hint file. (exercism#3930)"
This reverts commit be7378d.
1 parent 38d36ee commit 2bd4d41

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

exercises/concept/guidos-gorgeous-lasagna/.docs/hints.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424

2525
- You need to define a [function][defining functions] with a single parameter representing the number of layers.
2626
- Use the [mathematical operator for multiplication][numbers] to multiply values.
27-
- You can define a PREPARATION_TIME _constant_ for the time in minutes per layer rather than using a ["magic
28-
number"][magic-numbers] in your code.
27+
- You could define an extra _constant_ for the time in minutes per layer rather than using a "magic number" in your code.
2928
- This function should [return a value][return].
3029

3130
## 4. Calculate total elapsed cooking time (prep + bake) in minutes
@@ -44,7 +43,6 @@
4443
[constants]: https://stackoverflow.com/a/2682752
4544
[defining functions]: https://docs.python.org/3/tutorial/controlflow.html#defining-functions
4645
[docstrings]: https://docs.python.org/3/tutorial/controlflow.html#tut-docstrings
47-
[magic-numbers]: https://en.wikipedia.org/wiki/Magic_number_(programming)
4846
[naming]: https://realpython.com/python-variables/
4947
[numbers]: https://docs.python.org/3/tutorial/introduction.html#numbers
5048
[pep257]: https://www.python.org/dev/peps/pep-0257/

exercises/concept/guidos-gorgeous-lasagna/.docs/instructions.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,10 @@ Assume each layer takes 2 minutes to prepare.
5050
```
5151

5252

53-
## 4. Calculate total elapsed time (prepping + baking) in minutes
54-
55-
Define the `elapsed_time_in_minutes()` function that takes two parameters as arguments:
56-
57-
- `number_of_layers` (_the number of layers added to the lasagna_)
58-
- `elapsed_bake_time` (_the number of minutes the lasagna has spent baking in the oven already_).
59-
60-
This function should return the total minutes you have been in the kitchen cooking — your preparation time layering +
61-
the time the lasagna has spent baking in the oven.
53+
## 4. Calculate total elapsed cooking time (prep + bake) in minutes
6254

55+
Define the `elapsed_time_in_minutes()` function that takes two parameters as arguments: `number_of_layers` (_the number of layers added to the lasagna_) and `elapsed_bake_time` (_the number of minutes the lasagna has been baking in the oven_).
56+
This function should return the total number of minutes you have been cooking, or the sum of your preparation time and the time the lasagna has already spent baking in the oven.
6357

6458
```python
6559
>>> def elapsed_time_in_minutes(number_of_layers, elapsed_bake_time):

exercises/concept/guidos-gorgeous-lasagna/lasagna.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"""
99

1010

11-
#TODO: define your EXPECTED_BAKE_TIME (required) and PREPARATION_TIME (optional) constants below.
11+
#TODO: define the 'EXPECTED_BAKE_TIME' constant below.
1212

1313

1414
#TODO: Remove 'pass' and complete the 'bake_time_remaining()' function below.
@@ -27,9 +27,9 @@ def bake_time_remaining():
2727

2828

2929
#TODO: Define the 'preparation_time_in_minutes()' function below.
30-
# To avoid the use of magic numbers (see: https://en.wikipedia.org/wiki/Magic_number_(programming)), you should define a PREPARATION_TIME constant.
30+
# You might also consider defining a 'PREPARATION_TIME' constant.
3131
# You can do that on the line below the 'EXPECTED_BAKE_TIME' constant.
32-
# This will make it easier to do calculations, and make changes to your code.
32+
# This will make it easier to do calculations.
3333

3434

3535

0 commit comments

Comments
 (0)