Calculate number of permutations

import math

def calculate_permutations(n, k):
    return math.perm(n, k)

n = 5
k = 3

num_permutations = calculate_permutations(n, k)

print("Number of permutations:", num_permutations)

Leave a Reply

Your email address will not be published. Required fields are marked *