Question

In: Computer Science

##You have received the phone bill. ##You have 4 phones on your family plan. ##You think...

##You have received the phone bill.

##You have 4 phones on your family plan.

##You think that some members of the

##family are using too much data.

##

##You would like to calculate the following

##for each of the family members:

##  lowest number of minutes used

##  highest number of minutes used

##  average number of minutes used

##

##The following list (named phonebill) consists

##of 4 lists, each detailing the name of the family

##member, the number of minutes that family member

##used during the week (7 days) and the phone

##number of that person

phonebill = [

  ["Kiera", [11,21,13,14,15,60,38], "508-111-1110"],

  ["Lorenzo", [20,12,33,26,37,62,70],"508-111-1111"],

  ["Mabel", [31,27,43,7,52,68,5],"508-111-1112"],

  ["Nikolai", [8,7,212,28,114,30,39],"508-111-1113"]

  ]

##you are to calculate the following for each family

##member and append it to the list of information

##for that family member:

##  lowest number of minutes used

##  highest number of minutes used

##  average number of minutes used

##The list phonebill will be as follows after your program executes

[['Kiera', [11, 21, 13, 14, 15, 60, 38], '508-111-1110', 11, 60, 24.571428571428573],

['Lorenzo', [20, 12, 33, 26, 37, 62, 70], '508-111-1111', 12, 70, 37.142857142857146],

['Mabel', [31, 27, 43, 7, 52, 68, 5], '508-111-1112', 5, 68, 33.285714285714285],

['Nikolai', [8, 7, 212, 28, 114, 30, 39], '508-111-1113', 7, 212, 62.57142857142857]

]

Please done in Python format

Solutions

Expert Solution

Thanks for the question. Below is the code you will be needing. Let me know if you have any doubts or if you need anything to change. 

If you are satisfied with the solution, please leave a +ve feedback : ) Let me know for any help with any other questions.

Thank You!
===========================================================================


phonebill = [
    ["Kiera", [11, 21, 13, 14, 15, 60, 38], "508-111-1110"],
    ["Lorenzo", [20, 12, 33, 26, 37, 62, 70], "508-111-1111"],
    ["Mabel", [31, 27, 43, 7, 52, 68, 5], "508-111-1112"],
    ["Nikolai", [8, 7, 212, 28, 114, 30, 39], "508-111-1113"]
]

for member in phonebill:
    stats = member[1]
    lowest,highest,average = min(stats),max(stats),sum(stats)/len(stats)
    member.append(lowest)
    member.append(highest)
    member.append(average)


print(phonebill)

===============================================================


Related Solutions

You have just received a batch of goods from your supplier. You plan to sample the...
You have just received a batch of goods from your supplier. You plan to sample the batch in order to determine whether you will accept it or not. For this product, your contract with the supplier specifies that 3.0% is an acceptable quality level and the LTPD is 18.0%. The contract further specifies that the buyer’s risk should be 2.5% and the seller’s risk should be 1.0%. Given these parameters for your sampling plan, what is the least number of...
You are a small business owner considering two alternatives for your phone system. Plan A Plan...
You are a small business owner considering two alternatives for your phone system. Plan A Plan B Initial cost ($) 50,000 120,000 Annual maintenance cost ($) 9,000 6,000 Salvage value ($) 10,000 20,000 Life 20 years 40 years The discount rate is 8%. Which alternative would you pick? Plan A or Plan B
You are to develop a risk management plan for the Pierce family. Your plan should incorporate...
You are to develop a risk management plan for the Pierce family. Your plan should incorporate insurance and noninsurance recommendations. Provide a complete explanation of your assumptions. Remember to make the work your own. Case facts: Joe, 37, self-employed carpenter, four employees, nets $60,000 per year Anita, 37, part-time nurse, earns $30,000 per year Children: Nathan (12), Isaac (10), Charlotte (6), Lydia (3) Assets, in $ Personal Cash 12,000 Mutual funds 8,000 IRAs 15,000 401(k) 28,000 Car 20,000 ATV 5,000...
Look at your phone and find the most recent text message you received. How is this...
Look at your phone and find the most recent text message you received. How is this utterance part of a larger chain? How do distant and nearby discourses give it meaning? How about already-spoken and not-yet-spoken discourses?
You are the treasurer for ABC corporation.  You just received a bill from your Italian supplier of...
You are the treasurer for ABC corporation.  You just received a bill from your Italian supplier of Genoa salami for Eur 500,000. The Euros are due in three months. 1- What would you do to hedge this exposure? ( What hedge would you put on) 2- If you hedged the underlying position properly, what would you expect the net gain or loss to be when you combine the underlying position with the hedge mark-to-market?
Question 1 Have you set-up any unique EARCONS on your phone? Question 2 Do you think...
Question 1 Have you set-up any unique EARCONS on your phone? Question 2 Do you think mobile phone should have a different sound to the caller if your phone is busy? Question 3 Would you like to set-up your phone some that if persons A, B, or C (your favorite people) call you and you're on your phone would you like them to hear something other than "beep ... beep .... beep" (means your phone is busy)? Question 4 Would...
you are given a cell phone bill. You are charged $52 for the month. There is...
you are given a cell phone bill. You are charged $52 for the month. There is a $40 monthly fee and you are charged $4 per megabyte of data used. Construct a linear equation for this model What is the value of the y-intercept? What does it mean? What is the value of the slope? What does it mean? If you use 10 megabytes of data how much would you expect to pay for your bill? Where else might you...
A cell phone company offers a simple extended warranty plan. If your phone is damaged, they...
A cell phone company offers a simple extended warranty plan. If your phone is damaged, they will repair it for up to $50. If you lose or destroy your phone, they will give you a $200 voucher towards a new phone. The company believes that 5% of customers will need the replacement voucher and 10% will request a repair. 1. If the company charges $25 for this extended warranty, what is the expected value of the profit they will earn?...
Suppose we have 4 students and we take their phones then return the phones to them...
Suppose we have 4 students and we take their phones then return the phones to them randomly. Let X be the number of students who receive their own phone. Create a probability distribution chart for X.
Do you think that a U.S. Treasury bill will have a risk premium that is higher...
Do you think that a U.S. Treasury bill will have a risk premium that is higher than, lower than, or the same as that of a similar security (in terms of maturity and liquidity) issued by the government of Brazil? Why or why not?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT