Ad
Bugs
Code
Diff
  • def div(num1, num2):
        try:
            return (num1/num2)
        except ZeroDivisionError:
            print("Division failed: division by zero")
            return None
        except TypeError:
            print("Division failed: integers and floats accepted only")
            return None
    • def div(num1, num2):
    • return(num1 / num2)
    • try:
    • return (num1/num2)
    • except ZeroDivisionError:
    • print("Division failed: division by zero")
    • return None
    • except TypeError:
    • print("Division failed: integers and floats accepted only")
    • return None