Question: write this in paython the output should be the same Write a function called coin _ matches ( ) that takes a list of coin

write this in paython the output should be the same Write a function called coin_matches() that takes a list of coin values and a list of coin
names of the same length. This function returns a list of the indices where the coins' values
match the name of the coin.
Assumptions:
The length of the list of values is not longer than the list of coin names.
The coins you can expect are: penny (1), nickel (5), dime(10), quarter(50), dollar(100)
Signature:
def coin_matches(values, names):
#your code here
# ...
return
Examples:
coin_matches(['dime','dime','nickel'],[10,10,5])-> output[0,1,2]
coin_matches(['dime', 'dime', 'dime'],[10,10,5,1])->output[0,1]
['penny', 'dime', 'nickel', 'dollar', 'dime', 'nickel', '-> out put [2,3,7]
['dime', 'dime', 'penny'],[1,1,1]-> output [2]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!