13 lines
535 B
Python
13 lines
535 B
Python
from typing import List
|
|
|
|
from piggybank.currencies import CURRENCIES
|
|
|
|
EPILOGUE = """This program is to assist you to keep track of how much coins
|
|
you have across your piggy banks."""
|
|
|
|
|
|
def complement_array_of_coins(coins: List[int], currency: str,
|
|
_reversed: bool = False) -> List[int]:
|
|
"""Complements array of coins up to the count of currency's coins."""
|
|
offset_array = [0] * (CURRENCIES[currency]["count"] - len(coins))
|
|
return offset_array + coins if not _reversed else coins + offset_array |