You are given an amount of money in the format 2.88
. Split this amount in the minimal amount of Euro coins, which represents the given number.
The expected format would be: [ 2, 0.5, 0.2, 0.1, 0.05, 0.02, 0.01]
The Euro coins are:
2€, 1€, 50¢, 20¢, 10¢, 5¢, 2¢, 1¢
Implement the corresponding function.
Try to reduce the code to the minimal amount of characters! Spaces, linebreaks etc are counted.
-
The part1 script could be executed using the following command:
python3 part1.py 2.88
You can substitute 2.88 by whatever number of your election -
The part2 script could be executed using the following command:
python3 part2.py 2.88
-
Execute the included unit tests:
In the same terminal, execute the following command:
python3 test_part1.py