Find The missing number in each row
4
1 2 3 4
2 3 4 1
3 4 1 2
4 1 2 3
If all rows contains 1 to 4 numbers then it is true else false
n = int(input()) for i in range(n): flag = True nums = [int(j) for j in input().split()] for j in range(n): if j+1 not in nums: flag = False break print(flag)
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!