Answer to Question #187862 in Python for Siri

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


1
Expert's answer
2021-05-01T14:09:43-0400
# 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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS