For this Question: Given a 2-D matrix with M rows and N columns, find the number of ways to reach cell with coordinates (M-1,N-1) from starting cell (0,0) under the condition that you can only travel one step right or one step down.The first line of every test case consists of M and N, denoting the number of rows and number of column respectively.

Constraints
1<= M,N <=1000Single line output i.e count of all the possible paths from top left to the bottom right of a mxn matrix. Since the output can be very large number use modulo 10^9+7.Sample Input:
3 3

Sample Output:
6

Explanation:
(0,0) -> (0,1) -> (0, 2) -> (1, 2) -> (2, 2) -> (2, 3) -> (3, 3) is one of the ways, I have written this Solution Code: def totalPaths(n, r):
	x , y = 1, 1
	for i in range(r,0,-1):
		x = x*n
		y = y*i
		n = n-1
	return x//y
    
def uniquePaths(m, n):
	ans = totalPaths(m+n-2, n-1);
	return ans%1000000007;

arr = list(map(int, input().split(" ")))
print(uniquePaths(arr[0], arr[1]));, In this Programming Language: Python, Now tell me if this Code is compilable or not?