WILL GIVE BRAINLIEST IF DONE CORRECT
Write a program in PYTHON that will simulate an ATM machine. A user at this ATM machine can do one of 5 things:

1 – Deposit (adding money to the account)
2 – Withdrawal (removing money from the account)
3 – Balance Inquiry (check current balance)
4 – Transfer Balance (transfer balance from one account to another)
5 – Log Out (exits/ends the program)

Before a user can do any of those things, he/she must first enter his/her username and passcode. After 3 incorrect attempts at entering the username and password, the program will end. The list of legitimate users along with their user ID, passcode, and account balance is shown below.

Customer, Username, Password, Savings Account, Checking Account
Robert Brown, rbrown, blue123, $2500.00, $35.00
Lisa White, lwhite, red456, $500.00, $1250.00
Mark Black, mblack, green789, $750.00, $200.00


Once the user enters the username, password, and option choice correctly, process the transaction according to these rules:
Allow the user to make up to a maximum of 3 transactions at a time. After 3 transactions, the program will terminate and they must log in again.
After a transaction is completed, the program will update the running balance and give the customer a detailed description of the transaction. A customer cannot overdraft on their account; if they try to withdraw more money than there is, a warning will be given to the customer.

Also, note that the ATM doesn’t distribute or collect coins – all monetary values are in whole dollars (e.g. an integer is an acceptable variable type). Any incorrect transaction types will display an appropriate message and count as a transaction.

Respuesta :

Answer:

import sys

#account balance

account_balance = float(500.25)

##prints current account balance

def printbalance():

  print('Your current balance: %2g'% account_balance)

#for deposits

def deposit():

 #user inputs amount to deposit

 deposit_amount = float(input())

 #sum of current balance plus deposit

 balance = account_balance + deposit_amount

 # prints customer deposit amount and balance afterwards

 print('Deposit was $%.2f, current balance is $%2g' %(deposit_amount,

balance))

#for withdrawals

def withdraw():

 #user inputs amount to withdraw

 withdraw_amount = float(input())

 #message to display if user attempts to withdraw more than they have

 if(withdraw_amount > account_balance):

   print('$%.2f is greater than your account balance of $%.2f\n' %

(withdraw_amount, account_balance))

 else:

   #current balance minus withdrawal amount

   balance = account_balance - withdraw_amount

   # prints customer withdrawal amount and balance afterwards

   print('Withdrawal amount was $%.2f, current balance is $%.2f' %

(withdraw_amount, balance))

#system prompt asking the user what they would like to do

userchoice = input ('What would you like to do? D for Deposit, W for

Withdraw, B for Balance\n')

if (userchoice == 'D'): #deposit

 print('How much would you like to deposit today?')

 deposit()

elif userchoice == 'W': #withdraw

 print ('How much would you like to withdraw today?')

elif userchoice == 'B': #balance

 printbalance()

else:

 print('Thank you for banking with us.')

 sys.exit()

Answer:

account_balance = float(500.25)  print('Your current balance: %2g'% account_balance)  ('Deposit was $%.2f, current balance is $%2g' %(deposit_amount, balance)) print('$%.2f is greater than your account balance of $%.2f\n' % (withdraw_amount, account_balance))('Withdrawal amount was $%.2f, current balance is $%.2f' %  (withdraw_amount, balance)) ('How much would you like to deposit today?') ('How much would you like to withdraw today?') ('Thank you for banking with us.')

Explanation:

The simple answer