Adele is just learning to program, and she wrote a function that would divide 100 by the given number with certain conditions:
def divide_by(number):
if number > 0:
print(100 / number)
else:
print(100 / (number / 2))
But when she tried to call a function in a specific way, she saw a traceback with ZeroDivisionError:
Traceback (most recent call last):
File "/full/path/to/divide.py", line 40, in
divide_by(0)
File "/full/path/to/divide.py", line 38, in divide_by
print(100 / (number / 2))
ZeroDivisionError: division by zero
Correct the divide_by() function so that in the case of division by zero the user will receive a message like: Please enter a number that is not equal to zero.
You do NOT need to call a function, just implement it.