fork download
  1. a=int(input("Enter the value of a"))
  2. b=int(input("Enter the value of b"))
  3. result=a/b
  4. if b==0:
  5. raise ZeroDivisionError
  6. print("cannot divide by zero")
  7. else:
  8. print("result:",result)
  9.  
Success #stdin #stdout 0.03s 9668KB
stdin
10
2
stdout
Enter the value of aEnter the value of bresult: 5.0