• + 0 comments
    1. This question ask us to accept a,b
    2. but first give me how may of them i should have
    3. after that preform division and handle errors as ZeroDivisionError and ValueError In my code the first loop stores our input and the second do the work i meantioned before

    T = int(input()) inputs = [] for _ in range(T): inputs.append(input())

    for i in inputs: try: A, B = map(int, i.split()) print(A//B) except ZeroDivisionError as e: print(f"Error Code: {e} ") except ValueError as e: print(f"Error Code: {e} ") **