1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
koban [17]
2 years ago
6

def transfer(bank, log_in, userA, userB, amount): ''' In this function, you will try to make a transfer between two user account

s. 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 userB). 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:
Computers and Technology
1 answer:
laiz [17]2 years ago
8 0

Answer:

def transfer(bank, log_in, userA, userB, 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 userB). 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:

Explanation:

i know this much

You might be interested in
Consider the following methods:
il63 [147K]
<span>2. basketball This is a classic case of overloading in C++. You have 2 functions, both named "printSport", but one of the functions receives an input of type double, and the other receives an input of type int. The specified method call passes a parameter of type int, so the version of printSport is called that receives a parameter of type int. And that version of printSport only prints the word "basketball". The other version of printSport is never called at all.</span>
4 0
3 years ago
You are finally at the stage of the software life cycle where you begin programming. What is this stage called?
nataly862011 [7]
You are finally at the stage of the software life cycle where you begin programming. What is this stage called?

development

5 0
2 years ago
Which is the most efficient way to include a space after each paragraph
TEA [102]

I think the question is referring to the tab key.

5 0
3 years ago
Read 2 more answers
Write a program that asks the user for three names, then prints the names in reverse order. Sample Run: Please enter three names
Sauron [17]

Solution:

Since no language was specified, this will be written in Python.

n1, n2, n3 = input ("Enter three names: ").split()

print(n3)

print(n2)

print(n1)

Cheers.

4 0
3 years ago
A template class is a class in which ___________.
Romashka [77]

Answer: (A) At least one type is parameterized

Explanation:

 A template class is the type of class in which the one type are parameterized atleast in each template class. The template class mainly provide the various type of specifications so that it can generate the class based on the different types of parameters.

A template class is basically initialized by passing the template argument in the given types. In this type of class atleast one type is defined as the generic type.

Therefore, Option (A) is correct.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is a true statement about psychological tests administered by computers? computers make standardization e
    9·1 answer
  • Which type of denial of service attack exploits the existence of software flaws to disrupt a service?
    12·1 answer
  • In powerpoint, what is line thickness measured in?
    12·1 answer
  • Bill downloaded an antivirus software from the Internet. Under the Uniform Commercial Code (UCC), the software is a: Select one:
    15·1 answer
  • What does it mean to be self demanding?
    12·1 answer
  • Class members are accessed via the ____(1)_____ operator in conjunction with the name of an object of the class, or via the ___(
    6·1 answer
  • Describe how both IPv4 and IPv6 access and utilize TCP as an upper-layer transfer protocol.
    6·1 answer
  • For a typical middle-income family, what is the estimated cost of raising a child to the age of 18?
    11·1 answer
  • Suppose Client A initiates a Telnet session with Server S. At about the same time, Client B also initiates a Telnet session with
    13·1 answer
  • How does beamforming improve network service?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!