fork download
  1. n = int(input())
  2. i = 0
  3. while i < n:
  4. try:
  5. x, y = input().split(" ")
  6. x = float(x)
  7. y = float(y)
  8. if y != 0:
  9. print(x / y)
  10. i += 1
  11. else:
  12. print('divisao impossivel')
  13. except ValueError:
  14. print('fomrmato digitado errado')
  15.  
  16. #https://pt.stackoverflow.com/q/482421/101
Success #stdin #stdout 0.02s 9508KB
stdin
1
a b
2 0
10 3


stdout
fomrmato digitado errado
divisao impossivel
3.3333333333333335