Write a python function to solve the following problem.

Roll N(amount of) fair six-sided dice. The sum of the facevalues is M. Write a python function to determine how manydifferent ways can you roll the dice given M and N.

For example, if N=2 and M=7 the answer is 6, because you canroll this dice in these 6 different ways: (1,6), (2,5), (3,4),(4,3), (5,2), (6,1)

Another example: if N = 3 and M = 9 the answer is 25

Another example: if N = 8 and M = 24 the answer is 98813

def roll_dice(N,M):

result = []

return len(result)

## Expert Answer

Answer to Write a python function to solve the following problem. Roll N(amount of) fair six-sided dice. The sum of the face value…