codinasion-archive / codinasion-monorepo

Community Monorepo
https://codinasion.org
MIT License
52 stars 170 forks source link

Write a Python program to calculate the combination of n objects taken r at a time #1995

Closed harshraj8843 closed 1 year ago

harshraj8843 commented 1 year ago

Description

Write a Python program to calculate the combination of n objects taken r at a time

Combination is a selection of objects from a group such that (unlike permutations) the order of selection does not matter. The number of combinations on n objects taken r at a time is given by the formula n!/(r!(n-r)!) = n(n-1)(n-2)...(n-r+1)/r!

Input  : 5, 2
Output : 10
How to contribute - Save the solution in `program/calculate-the-combination-of-n-objects-taken-r-at-a-time.py` file - Add `calculate-the-combination-of-n-objects-taken-r-at-a-time.py` file in `calculate-the-combination-of-n-objects-taken-r-at-a-time` folder
kshitijv256 commented 1 year ago

!assign

kshitijv256 commented 1 year ago

Completed the task codinasion/program#2856 Please review and merge it