Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Python code this please. I need this EXACT output and a screenshot of the code for indentation purposes would be great. -k. Open the
In Python code this please.
I need this EXACT output and a screenshot of the code for indentation purposes would be great.
-k. Open the text file revenue.txt for reading, whose contents are 1) 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. 2) Sort the cities according to their Q1, Q3 and total revenues. (200 points) 1: Project 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 Alabaster [40, 50, 23, 18] 131 32.75 Anniston [56, 78, 34, 11] 179 44.75 Decatur [44, 23, 56, 11] 134 33.50 Gadsden [45, 67, 54, 77] 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'] BO 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 o | 4. Run Ruthon ConsoleStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started