Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update utils.py #6

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
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)