"""Code for worksheet on nested lists and loops."""


def digital_sum(nums_list: list[str]) -> int:
    """Return the sum of all the digits in all strings in nums_list.
    If nums_list is empty, return 0.

    Precondition: s.isdigit() holds for each string s in nums_list.

    >>> digital_sum(['64', '128', '256'])
    34
    >>> digital_sum(['12', '3'])
    ???
    >>> digital_sum(???)
    ???
    >>> digital_sum(???)
    ???

    """

    pass


def can_pay_with_two_coins(denoms: list[int], amount: int) -> bool:
    """Return True if and only if it is possible to form amount, which is a
    number of cents, using exactly two coins, which can be of any of the
    denominations in denoms.

    Pre: each element of denoms is positive
         amount >= 0

    >>> can_pay_with_two_coins([1, 5, 10, 25], 35)
    True
    >>> can_pay_with_two_coins([1, 5, 10, 25], 20)
    True
    >>> can_pay_with_two_coins([1, 5, 10, 25], 12)
    ???
    >>> can_pay_with_two_coins(???, ???)
    ???
    >>> can_pay_with_two_coins(???, ???)
    ???
    >>> can_pay_with_two_coins(???, ???)
    ???
    >>> can_pay_with_two_coins(???, ???)
    ???
    """

    pass


if __name__ == '__main__':

    import doctest
    doctest.testmod()
