Denominations - 2
Write a Python program of Denominations - 2. It consists of two test cases
The below link contains Denominations - 2 - Question, explanation and test cases
https://drive.google.com/file/d/1DDPxBvRR7xx5Mbm68ThgRUe0h6QoOrQB/view?usp=sharing
We need all test caese can be come while code was running
notes = [100, 50, 20, 10]
n = int(input('Enter currency here:'))
for I in notes:
if n >= I:
s = n//I
n = n-(s*I)
print (str(I)+' ' +'notes' ," : ", s)
Enter currency here:370
100 notes : 3
50 notes : 1
20 notes : 1
Enter currency here:130
100 notes : 1
20 notes : 1
10 notes : 1
Comments
Leave a comment