MCPcopy Create free account
hub / github.com/geekcomputers/Python / divide

Function divide

simple_calculator/simple_calculator.py:14–18  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

12
13
14def divide(x, y):
15 # Prevent division by zero
16 if y == 0:
17 return "Error: Division by zero is not allowed"
18 return x / y
19
20
21# Display the options to the user

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected