x = float(input("Insert first number: ")) y = float(input("Insert second number: ")) try: z = x/y except ZeroDivisionError: print("Error! Number not divisible by zero...") else: print(z)

Output:
Insert first number: 12
Insert first number: 0 