Question: PLE HELP ME BY PYTHON PLE HELP ME BY PYTHON In this project, you will write two files: a class that represents a bank account

PLE HELP ME BY PYTHON

PLE HELP ME BY PYTHON PLE HELP ME BY PYTHON In this

PLE HELP ME BY PYTHON

In this project, you will write two files: a class that represents a bank account and a program that works ike an ATM for bank accounts. The Bank Account Class In a file named account.py, create an Account class. An account object has these attributes: acct_number : the account number (an integer) name : the account holder's name pin: the account holder's PIN, which is a four-character string, since it can have leading zeros. balance : the current balance in the account, which is a float. Implement these methods: _init__(self, acct_number, name, pin, balance) The constructor _str_(self) Returns a string giving the account ID, name, PIN, and balance, separated by colons. Do not use format on the balance; you want to keep the number as accurate as possible. deposit(self, amount) Adds the given amount (a float ) to the current balance. If the amount is negative, the balance must not be changed; otherwise, the balance attribute is updated to reflect the deposit. This method returns the updated balance. withdraw(self, amount) Withdraws the given amount (a float ) from the current balance. If the amount is negative or greater than the current balance, the balance must not be changed; otherwise, the balance attribute is updated to reflect the withdrawal. This method returns the updated balance. Note that deposit and withdrawo do not print error messages if they get incorrect input; they simply ignore it. It is up to the program that calls these functions to provide the error messages for the user of the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!