Question #187862

given a number of mangoes and number of persons. Find the number of ways to distribute identical mangoes among identical persons in python


Expert's answer

# we take into account the fact that giving no mango to anyone
# is a way to distribute 0 mangoes
q_mango = int(input ('Enter the amount of mango: '))
q_people = int(input ('Enter the number of people: '))
print('Number of ways to distribute an equal amount of mangoes: ',
      q_mango//q_people + 1)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS