Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Resolve GH-69
Browse files Browse the repository at this point in the history
Move find square function to "calc" package.
Test cases has been adjusted as well.

Co-authored by: [email protected]
  • Loading branch information
shorodilov committed Nov 30, 2023
1 parent 6032c42 commit 9557796
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/calc/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,22 @@
"""

from typing import List
from typing import List, Union


def get_square(number: Union[int, float]) -> Union[int, float]:
"""
Calculate the square value of a given number
:param number: The input number for which the square value is calculated.
:type number: int | float
:return: the square value of the input number
:rtype: int | float
"""

return number ** 2


def get_square(number: int) -> int:
Expand Down

0 comments on commit 9557796

Please sign in to comment.