Learn

Excellent work! You’ve got your very own Account class and checking_account instance, complete with public and private methods.

Go ahead and try to get to your pin from outside the class. Not easy, is it?

How could you improve this class? You might:

  • Include a deposit method that lets users add money to their accounts
  • Include error checking that prevents users from overdrawing their accounts
  • Create CheckingAccounts or SavingsAccounts that inherit from Account

Instructions

Feel free to add to your code until you’ve got it working just as you want it. Then click Run to complete this project!

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Already have an account?