Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Assignment 1 Question 3
- Date Written: March, 2019
- Author: Russell Bloxwich
- ID:692618785
- Description: Calculates the minimum number of each notes required to represent a value
- """
- #100, 50, 25, 10, 5, 1
- divider = "==================="
- value = int(input("Value: "))
- hundreds = value // 100
- value -= (100 * hundreds)
- fifties = value // 50
- value -= (50 * fifties)
- twenty_fives = value // 25
- value -= (25 * twenty_fives)
- tens = value // 10
- value -= (10 * tens)
- fives = value // 5
- value -= (5 * fives)
- print("You will need:")
- print(divider)
- print(" 100s:", hundreds)
- print(" 50s:", fifties)
- print(" 25s:", twenty_fives)
- print(" 10s:", tens)
- print(" 5s:", fives)
- print(" 1s:", value)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement