Entradas

Programa Permutaciones y Combinaciones en python

from math import factorial def numero_combinaciones(m, n):   return factorial(m) // (factorial(n) * factorial(m - n)) def numero_permutaciones(m, n):        return factorial(m) // factorial(m - n) print("1-Calcular el numero de combinaciones") print("2-Calcular perumtaciones") opc=int(input("Ingrese su seleccion ")) if opc==1:     m=int(input("Ingrese m "))     r=int(input("Ingrese n "))     print(numero_combinaciones(m,r))         elif opc==2:     m=int(input("Ingrese m "))     r=int(input("Ingrese r "))     print(numero_permutaciones(m,r))