Get the answers you need at Westonci.ca, where our expert community is always ready to help with accurate information. Join our platform to connect with experts ready to provide accurate answers to your questions in various fields. Experience the convenience of finding accurate answers to your questions from knowledgeable experts on our platform.
Sagot :
Using the knowledge in computational language in python this code will be described for bank is a dictionary where the key is the username and the value is the user's account balance.
Writing code in python:
def transfer (bank, log_in, userA, userB, amount):
if userA in bank and log_in[userA]:
if userB in log_in:
if amount <= bank [userA]:
bank [userA] -= amount
bank[userB] += amount
return true
return false
bank= {"Bradon": 115.5, "Patrick": 18.9, "Sarah": 827.43, "Jack": 45.0, "James": 128.87}
log_in= {"Bradon": False, "Jack": False, "James": False, "Sarah": False}
transfer(bank, log_in, "Bradon", "Jack", 100)
See more about python at brainly.com/question/18502436
#SPJ1
Thank you for visiting. Our goal is to provide the most accurate answers for all your informational needs. Come back soon. We appreciate your time. Please revisit us for more reliable answers to any questions you may have. Thank you for choosing Westonci.ca as your information source. We look forward to your next visit.