Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ def divide(a: float, b: float) -> float:
Returns:
float
'''
return a / b

if b!=0:
return a / b
else:
print("b shouldn't be zero")

def modulo(a: int, b: int):
'''
Expand Down Expand Up @@ -91,7 +95,7 @@ def return_hexadecimal(a: int) -> float:
return hex(a)


def return_random_number() -> int:
def return_random_number(a: int, b:int) -> int:
'''
...

Expand All @@ -102,5 +106,4 @@ def return_random_number() -> int:
Returns:
float
'''

return np.random.randint(0, 100)
return np.random.randint(a, b)