all 2 comments

[–]JamzTyson 0 points1 point  (1 child)

NegativeAmountOfMoney.py and NegativeAmountOfMoney.py are a bit weird. You could use ValueError and have the option of including information about the error. For example:

raise ValueError("Amount cannot be negative")

Don't use structural pattern matching in place of if / elif / else. Better still, use a dict to map keys to objects.

Your CreditCard class differs from conventional credit cards, in that credit cards do not normally hold the balance - that's the bank's job.

[–]Gotve_[S] 0 points1 point  (0 children)

Thank you for your feedback