Skip to content

Commit

Permalink
Fix errors with the last code review
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardob90 committed Apr 2, 2024
1 parent 2870999 commit 5b1858c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,10 @@
"Write a Python function called `greet` that takes two parameters: `name` (a string) and `age` (an integer).\n",
"The function should return a greeting message in the following format: `\"Hello, <name>! You are <age> years old.\"`\n",
"\n",
"**Do not** forget to write a proper docstring and add the correct type hints to the parameters and the return value."
"<div class=\"alert alert-block alert-warning\">\n",
" <h4><b>Note</b></h4>\n",
" <strong>Do not</strong> forget to write a proper docstring and add the correct type hints to the parameters and the return value.\n",
"</div>"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions tutorial/tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def read_data(name: str, data_dir: str = "data") -> pathlib.Path:

def reference_greet(name: str, age: int) -> str:
"""Reference solution for the greet exercise"""
return f"Hello {name}, you are {age} years old."
return f"Hello {name}! You are {age} years old."


def test_greet(function_to_test) -> None:
Expand Down Expand Up @@ -53,9 +53,9 @@ def reference_calculate_area(
"""Reference solution for the calculate_area exercise"""
# Conversion factors from supported units to centimeters
units = {
"cm": 1,
"m": 100,
"mm": 10,
"cm": 1.0,
"m": 100.0,
"mm": 10.0,
"yd": 91.44,
"ft": 30.48,
}
Expand Down

0 comments on commit 5b1858c

Please sign in to comment.