Practice: Nested Conditions
Q21. ATM withdrawal
balance=500, pin_ok=True, amount=700. If pin_ok, print 'Done' when amount <= balance else 'Insufficient funds'. If PIN is wrong print 'Bad PIN'.
Goal: Layer checks in an ATM.
balance=500, pin_ok=True, amount=700. If pin_ok, print 'Done' when amount <= balance else 'Insufficient funds'. If PIN is wrong print 'Bad PIN'.
Goal: Layer checks in an ATM.