Skip to content

Commit

Permalink
Update two_decimal_places.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ikostan committed Oct 24, 2024
1 parent 241cc9f commit 443a58f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kyu_7/formatting_decimal_places_1/two_decimal_places.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def two_decimal_places(number) -> float:
only the first two decimal places are returned.
You don't need to check whether the input is a valid
number because only valid numbers ae used in the tests.
number because only valid numbers are used in the tests.
Don't round the numbers! Just cut them after two decimal
places!
Expand All @@ -20,4 +20,4 @@ def two_decimal_places(number) -> float:
:return: float
"""
number_str: str = str(number)
return float(number[0: number_str.index('.') + 3])
return float(number_str[0:number_str.index('.') + 3])

0 comments on commit 443a58f

Please sign in to comment.