diff --git a/assets/dailyprogrammer.gif b/assets/dailyprogrammer.gif new file mode 100644 index 0000000..7ce1fa7 Binary files /dev/null and b/assets/dailyprogrammer.gif differ diff --git a/readme.gif b/assets/readme.gif similarity index 100% rename from readme.gif rename to assets/readme.gif diff --git a/python/pythonchallenge.com/PP from Beatmap ID.py b/python/PP from Beatmap ID.py similarity index 100% rename from python/pythonchallenge.com/PP from Beatmap ID.py rename to python/PP from Beatmap ID.py diff --git a/python/dailyprogrammer/#393 - Making Change.py b/python/dailyprogrammer/#393 - Making Change.py new file mode 100644 index 0000000..1b64e9b --- /dev/null +++ b/python/dailyprogrammer/#393 - Making Change.py @@ -0,0 +1,16 @@ +COINTYPES = [500, 100, 25, 10, 5, 1] + +class Change(): + def __init__(self, value): + self.value = value # Save the value + self.coins = {} # Create a dictionary for the coins + curr = value # Make a temporary variable to alter + for TYPE in COINTYPES: # For each coin type + index = COINTYPES.index(TYPE) # Get the index + if index > 0: # If the coin type is not at the first index + curr = curr % COINTYPES[index - 1] # Work out the remainder + self.coins[TYPE] = curr // TYPE # And work out how many of the coin type fits into that remainder + self.total = sum(self.coins.values()) # How many coins are there in total? + +change = Change(123456) +print(change.coins, change.total) diff --git a/python/dailyprogrammer/readme.md b/python/dailyprogrammer/readme.md new file mode 100644 index 0000000..13c79a7 --- /dev/null +++ b/python/dailyprogrammer/readme.md @@ -0,0 +1,10 @@ +
+ +

r/dailyprogrammer

+
+ +[The Subreddit](https://reddit.com/r/dailyprogrammer) + +- #393 - Making Change + - [Solution](%23393%20-%20Making%20Change.py) + - [Reddit Post](https://www.reddit.com/r/dailyprogrammer/comments/nucsik/20210607_challenge_393_easy_making_change/) diff --git a/python/pythonchallenge.com/readme.md b/python/pythonchallenge.com/readme.md new file mode 100644 index 0000000..ad8ffb5 --- /dev/null +++ b/python/pythonchallenge.com/readme.md @@ -0,0 +1,19 @@ +
+ +

pythonchallenge.com

+
+ +- [1 - Map](1%20-%20Map.py) +- [2 - OCR](2%20-%20OCR.py) +- [3 - Equality](3%20-%20Equality.py) +- [4 - linkedlist](4%20-%20linkedlist.py) +- [5 - Peak Hell](5%20-%20Peak%20Hell.py) +- [6 - Channel](6%20-%20Channel.py) +- [7 - Oxygen](7%20-%20Oxygen.py) +- [8 - Integrity](8%20-%20Integrity.py) +- [9 - Good](9%20-%20Good.py) +- [10 - Bull](10%20-%20Bull.py) +- [11 - 5808](11%20-%205808.py) +- [12 - Evil](12%20-%20Evil.py) +- [13 - Disproportional](13%20-%20Disproportional.py) +- [14 - Italy](14%20-%20Italy.py) diff --git a/readme.md b/readme.md index 9af8c10..7f8a49d 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,5 @@ -
- +

the honk

@@ -17,24 +16,10 @@ - [Square Root](python/calculators/Square%20Root.py) - [Spearman's Rank Correlation Coefficient](python/calculators/SRCC.py) - [Standard Deviation](python/calculators/Standard%20Deviation.py) -- [osu](python/osu) - - [Get PP from a beatmap ID](python/osu/PP%20from%20Beatmap%20ID.py) +- [osu! - Get PP from a beatmap ID](python/osu/PP%20from%20Beatmap%20ID.py) - [Pygame Pong](python/pygame%20pong) - [pythonchallenge.com](python/pythonchallenge.com) - - [1 - Map](python/pythonchallenge.com/1%20-%20Map.py) - - [2 - OCR](python/pythonchallenge.com/2%20-%20OCR.py) - - [3 - Equality](python/pythonchallenge.com/3%20-%20Equality.py) - - [4 - linkedlist](python/pythonchallenge.com/4%20-%20linkedlist.py) - - [5 - Peak Hell](python/pythonchallenge.com/5%20-%20Peak%20Hell.py) - - [6 - Channel](python/pythonchallenge.com/6%20-%20Channel.py) - - [7 - Oxygen](python/pythonchallenge.com/7%20-%20Oxygen.py) - - [8 - Integrity](python/pythonchallenge.com/8%20-%20Integrity.py) - - [9 - Good](python/pythonchallenge.com/9%20-%20Good.py) - - [10 - Bull](python/pythonchallenge.com/10%20-%20Bull.py) - - [11 - 5808](python/pythonchallenge.com/11%20-%205808.py) - - [12 - Evil](python/pythonchallenge.com/12%20-%20Evil.py) - - [13 - Disproportional](python/pythonchallenge.com/13%20-%20Disproportional.py) - - [14 - Italy](python/pythonchallenge.com/14%20-%20Italy.py) +- [r/dailyprogrammer](python/dailyprogrammmer) ### Coursework