repeated here: Alabaster 40 50 23 18 Anniston 56 78 34 11 Athens 40 34 18 30 Auburn 55 67 23 11 Decatur 44 23 56 11 Florence 55 67 33 23 Gadsden 45 67 54 77 Write Python code that do the following: 1) Sum up all 4 quarter revenues and average them.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
1).
-k. Open the text file revenue.txt for reading, whose contents are
repeated here:
Alabaster 40 50 23 18
Anniston
56 78 34 11
Athens
40 34 18 30
Auburn
55 67 23 11
Decatur
44 23 56 11
Florence
55 67 33 23
Gadsden
45 67 54 77
Write Python code that do the following:
1) Sum up all4 quarter revenues and average them.
2) Sort the cities according to their Q1, Q3 and total revenues.neve/mints)
Transcribed Image Text:1). -k. Open the text file revenue.txt for reading, whose contents are repeated here: Alabaster 40 50 23 18 Anniston 56 78 34 11 Athens 40 34 18 30 Auburn 55 67 23 11 Decatur 44 23 56 11 Florence 55 67 33 23 Gadsden 45 67 54 77 Write Python code that do the following: 1) Sum up all4 quarter revenues and average them. 2) Sort the cities according to their Q1, Q3 and total revenues.neve/mints)
File Edit View Navigate Code Help
Run
1
City
Revenue
Total Average
Florence
[55, 67, 33, 23]
178
44.50
Athens
[40, 34, 18, 30]
122
30.50
E Alabaster [40, 50, 23, 18]
131
32.75
Anniston
[56, 78, 34, 11]
179
44.75
Decatur
[44, 23, 56, 11]
[45, 67, 54, 77]
134
33.50
Gadsden
243
60.75
Auburn
[55, 67, 23, 11]
156
39.00
Sort the cities by their Quarter 1 revenues.
['Athens', 'Alabaster', 'Decatur', 'Gadsden', 'Florence', 'Auburn', 'Anniston']
Sort the cities by their Quarter 3 revenues.
['Athens', 'Alabaster', 'Auburn', 'Florence', 'Anniston', 'Gadsden', 'Decatur']
Sort the cities by their total revenues.
['Athens', 'Alabaster', 'Decatur', 'Auburn', 'Florence', 'Anniston', 'Gadsden']
Process finished with exit code 0
4. Run
A Duthon Console
a 1: Project
Transcribed Image Text:File Edit View Navigate Code Help Run 1 City Revenue Total Average Florence [55, 67, 33, 23] 178 44.50 Athens [40, 34, 18, 30] 122 30.50 E Alabaster [40, 50, 23, 18] 131 32.75 Anniston [56, 78, 34, 11] 179 44.75 Decatur [44, 23, 56, 11] [45, 67, 54, 77] 134 33.50 Gadsden 243 60.75 Auburn [55, 67, 23, 11] 156 39.00 Sort the cities by their Quarter 1 revenues. ['Athens', 'Alabaster', 'Decatur', 'Gadsden', 'Florence', 'Auburn', 'Anniston'] Sort the cities by their Quarter 3 revenues. ['Athens', 'Alabaster', 'Auburn', 'Florence', 'Anniston', 'Gadsden', 'Decatur'] Sort the cities by their total revenues. ['Athens', 'Alabaster', 'Decatur', 'Auburn', 'Florence', 'Anniston', 'Gadsden'] Process finished with exit code 0 4. Run A Duthon Console a 1: Project
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY