Python Forum
Adding and Removing coins to match Coin Bag Total infinite times
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding and Removing coins to match Coin Bag Total infinite times
#6
(Sep-09-2018, 03:25 PM)Strayfe Wrote: Would I then use it in a for loop or while loop
You don't need loop in the function that checks specific bag. note that you already know what type of bag it is. Then you can extract the value from the dict or dicts(if you stick to two dict approach) just using the key.
If you are not sure how to access dict values, check our tutorial
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: Adding and Removing coins to match Coin Bag Total infinite times - by buran - Sep-09-2018, 03:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Print the frequency of each coin for the combinations that sum to the amount N Pranav 3 2,617 May-19-2020, 06:16 AM
Last Post: Pranav
  Random module, coin flipping gus17 3 5,034 Jan-06-2020, 10:29 AM
Last Post: perfringo
  Need help with coin change program Gateux 2 6,136 Jun-25-2019, 02:32 PM
Last Post: perfringo
  Find how many times a user played an artist and how many times disruptfwd8 1 2,655 May-04-2018, 08:32 AM
Last Post: killerrex
  Match coins game AndJustice4A11x 1 6,024 Nov-05-2017, 01:43 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020