ianpaule2727 ianpaule2727
  • 24-11-2020
  • Computers and Technology
contestada

mins_by_phone(phone): calculate and return the number of call minutes associated with the given phone line in this plan based on

Respuesta :

IfeanyiEze8899 IfeanyiEze8899
  • 26-11-2020

Answer:

def mins_by_phone(phone):

   if phone in self.phones:

       min_sum = 0

       for call in calls:

           min_sum += call

           return min_sum

   else:

       return 0

Explanation:

The mins_by_phone function above is the Phone class method. It checks for the presence of the argument value in the self.phones instance variable, which is a list and  sums up and returns the call minutes in the call list.

Answer Link

Otras preguntas

On the second day of a hiking trip, the tourists covered 17% bigger distance than on the first day. By how many percent did their average speed change from firs
Graph  (x+1)(x−2)(x−3) Relative maximum: f(x) = Relative minimum: f(x) =
Is it better to sit on right or left of cinema screen?
Why do property crimes occur more frequently than violent crimes?
What is the time constant of a 0.01 microfarad capacitor and a 600 ohm resistor connected in series?
The human body is composed of chemicals true or false
Look at the cell membrane model below, what is the name of the macromolecule that makes up the majority of the cell membrane?
Tort law most frequently emerges from common law precedent. a. True b. False
Let f(3) = 0, f'(3) =6, g(3) = 1 and g'(3) = 1/3. find h'(3)
PLEASE HELP ASAP I'LL GIVE BRIAINLIEST!!!! <3 1.)tickets to the movie theater cost $12 per person. write an expression to represent the total cost of tickets