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

Help I need help ASAP please and thanks
please helppppppppppppppppppppppppppppppppppppppppp
Advice learners with THREE strategies that will assist them to read the question withunderstanding​
local pizza joint sold a total of 1600 small pizzas at $9 and pasta dinners at $13 during the Super Bowl how many of each did they sell if total sales were $15,
brainliest for a right answer​
Verticales1.- Nombre que se la da a la acción de fumar mucho....2.- Componente nocivo del tabaco3.- Acoso escolar, violencia,4.- Persona que sufre de anorexia s
What is the distance between 0 and 3?
What is the best summary of the story for The Lessons in Design for question 2
I need helppppppppppppppppppppppppppppppppppppppp
why should we avoid putting a battery in a pocket containing keys? ​