human
Count all possible paths from top left to bottom right of a mXn matrix | function to return count of possible paths to reach cell at row number m and column number n from the topmost leftmost cell ( cell at 1 , 1 ).
If either given row number is first or given column number is first.
If diagonal movements are allowed then the last addition is required ..
Driver program to test above function"
How can the above be solved in Python?
 ... What is a code to count all possible paths from top left to bottom right of a mXn matrix and the other steps required?
assistant
#Here is code to count all possible paths from top left to bottom right of a mXn matrix and the other steps required.
 def numberOfPaths ( m , n ) :
	if ( m == 1 or n == 1 ) :
		return 1
	return numberOfPaths ( m - 1 , n ) + numberOfPaths ( m , n - 1 )
m = 3
n = 3
print ( numberOfPaths ( m , n ) )