Divide correctly

Report a typo

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.

Sample Input 1:

5

Sample Output 1:

20.0

Sample Input 2:

0

Sample Output 2:

Please enter a number that is not equal to zero
Write a program in Python 3
def divide_by(number):
if number > 0:
print(100 / number)
else:
print(100 / (number / 2))
___

Create a free account to access the full topic