subject

def transfer(bank, login, user, user, amount): ''' In this function, you will try to make a transfer between two user accounts. bank is a dictionary where the key is the username and the value is the user's account balance. log_in is a dictionary where the key is the username and the value is the user's log-in status. amount is the amount to be transferred between user accounts (userA and userA). amount is always positive. What you will do: - Deduct the given amount from userA and add it to userB, which makes a transfer. - You should consider some following cases: - userA must be in the bank and his/her log-in status in log_in must be True. - userB must be in log_in, regardless of log-in status. userB can be absent in the bank. - No user can have a negative amount in their account. He/she must have a positive or zero balance. Return True if a transfer is made. For example:

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 22:30, studybug2306
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
image
Computers and Technology, 24.06.2019 00:30, Auttyrain3929
Afiling system in which an intermediary source of reference, such as a file card, must be consulted to locate specific files is called a(n) system. a. shelf filing b. direct filing c. indirect filing d. shingling
Answers: 1
image
Computers and Technology, 24.06.2019 13:30, livie225
Type the correct answer in the box. spell all words correctly. what is the default margin width on all four sides of a document? by default, the document has a margin on all four sides.
Answers: 1
image
Computers and Technology, 24.06.2019 23:00, elha20
The valves of the heart and veins are similar in that they both
Answers: 1
You know the right answer?
def transfer(bank, login, user, user, amount): ''' In this function, you will try to make a transfer...

Questions in other subjects:

Konu
Mathematics, 03.11.2020 19:30