My issue
I wanna check if B is a floating value or not. If B is an integer it will return B or else -1
My code
# Step 1: Read and understand the problem statement and sample test cases
# Click on 'Next' once you are ready to proceed.
t=int(input())
for i in range(t):
A, C=map(int, input().split)
B=(A+C)/2
if B==int:
print(B)
else:
print(-1)
Learning course: Python for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone