Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- coins=int(input('How many £1 coins are there to share '))
- people=int(input('How many people to share with '))
- coinseach=coins//people
- coinsleft=coins % people
- if (coinseach!= 0):
- print('There are ',coinseach,' £1 coins each\n')
- else:
- print('There are not enough £1 coins to share evenly ')
- if (coinsleft ==0):
- print('There are no coins left over')
- else:
- print('There are ',coinsleft,' coins left over')
- pence=coinsleft*100
- print('If you converted the left over pound coins to pence you would have', pence, ' pence')
- if (pence >= people):
- penceeach=pence//people
- penceleft=pence%people
- print('You could give everybody ',penceeach,' and have ',penceleft,' pence left')
- else:
- print('but there are not enough pence to distribute')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement