From a1028f8d66a5d5d8e1898f2765f686d894784e68 Mon Sep 17 00:00:00 2001 From: Nagasai Vuppala <99129804+nagasai-222@users.noreply.github.com> Date: Fri, 6 Oct 2023 21:42:59 +0530 Subject: [PATCH] Create PermutationsandCombinations.py --- PermutationsandCombinations.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 PermutationsandCombinations.py diff --git a/PermutationsandCombinations.py b/PermutationsandCombinations.py new file mode 100644 index 0000000..4f0a481 --- /dev/null +++ b/PermutationsandCombinations.py @@ -0,0 +1,7 @@ +import math +n = 5 +r = 3 +permutations = math.perm(n, r) +combinations = math.comb(n, r) +print(f"Permutations: {permutations}") +print(f"Combinations: {combinations}")