For this Question: In a pascal triangle starting from top to bottom. Find the value of the element in a given row and column position i.e. ith row and at jth position.The first line of input contains an integer T denoting the number of test cases. Each test case will have two integers indexes of the ith row and jth column provided in the new line.

Constraints:
1 <= T <= 100
0 <= j <= i <= 500
Print the answer for each testcase in separated line. Since the output can be very large, mod your output by 10^9+7.Input:
2
0 0 
2 1

Output:
1
2
Explanation: The Pascal Triangle has first value as 1. (0th row 0th element). The pascal triangle has next set of values as 1 1. (1th row). On the next level, pascal triangle has values 1 2 1. (2nd row). Its 1st element is 2. (0 based)., I have written this Solution Code: 
t = int(input())
mod = 10**9 + 7
while (t > 0):
	n,k = map(int,input().split())

	factOfRow = 1
	factOfCol = 1

	factRowMinusCol = 1
	for i in range(1,n+1):
		factOfRow *= i
	
	for i in range(1,k+1):
		factOfCol *= i
	for i in range(1,n - k+1):
		factRowMinusCol *= i

	fact = factOfRow // (factOfCol * factRowMinusCol)

	print(fact %mod)
	t = t -1
	
, In this Programming Language: Python, Now tell me if this Code is compilable or not?