Created
April 9, 2020 07:34
-
-
Save lakshay-arora/d5b9e2028ff8804a0179d3892b84b427 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# function to divide two numbers | |
def division(a, b): | |
return a/b | |
# function works fine when you try to divide the number by a non-zero number | |
division(10, 2) | |
# >> 5.0 | |
division(10,-3) | |
# >> -3.333333334 | |
# Error when you try to divide the number by zero | |
division(10,0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment