A bank Account should refuse to exist if its details make no sense.
Part 1: Account(owner, balance=0)
owner is empty or only spaces, raise ValueError("owner needs a name").balance is below 0, raise ValueError("balance can't be negative").owner with spaces trimmed off its ends, and store balance.Part 2: open_account(owner, balance=0)
Try to make an Account. Then:
"<owner> opened with <balance>", built from the account's attributes,ValueError happened, return "refused: " followed by the error's message.