Facebook
From code for school 123, 9 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 324
  1. bankinfo={
  2.     123:["Ali",15000],
  3.     888:["Khaled",11000],
  4.     444:["fahd",11000]
  5. }
  6. print("Bank info state:",bankinfo)
  7.  
  8. accountno=int(input("enter an account number: "))
  9. account=bankinfo.get(accountno)
  10. balance=account[1]
  11. amount=float(input("enter amount to be deposited"))
  12. newbalance=balance+amount
  13. account[1]=newbalance
  14. print("bank info state: ",bankinfo)