+ 3

python programming question

You have x no. of 5 rupee coins and y no. of 1 rupee coins. You want to purchase an item for amount z. The shopkeeper wants you to provide exact change. You want to pay using minimum number of coins. How many 5 rupee coins and 1 rupee coins will you use? If exact change is not possible then display -1.

12th Jun 2019, 8:08 PM
Shivendra
Shivendra - avatar
1 Answer
- 3
What is the value of z define it first 'cause in python every variable should have a value without value it will display error
21st Dec 2019, 4:34 PM
KillerUV
KillerUV - avatar