Home / Expert Answers / Computer Science / urgent-how-do-i-do-this-write-a-python-program-that-solves-the-task-below-remember-to-34-mark-34-yo-pa599

(Solved): URGENT!! How do I do this Write a Python program that solves the task below. Remember to "Mark" yo ...



Write a Python program that solves the task below. Remember to Mark your code before the test ends.
Your program should rea1 Year, City, Discipline, sport, Athlete, Country_Code, Gender, Event, Medal
22000, Sydney, Aquatics, Diving, SAUTIN Dmitry

URGENT!! How do I do this

Write a Python program that solves the task below. Remember to "Mark" your code before the test ends. Your program should read from medals.csv and calculate for each country the 'score' of medals that have been won, where a Gold medal is worth 3, a Silver medal is worth 2, and a Bronze medal is worth 1 . So if a country is awarded 2 Gold medals, 4 Silver medals, and 2 Bronze medals, its 'score' is 16. Print which country has the highest score, and then print the score of each country with a score of at least 20. You may assume there will not be a tie, and that medals.csv will not be empty. Using the provided medals.csv, your program should output the winner, and then one line for each country with a score of 20 or more in the file. Format your output as shown below, with each country's code sorted alphabetically: 1 Winner: USA 2 ARG: 37 3 AUS: 372 4 BLR: 36 5 BRA: 60 6 BUL: 29 7 CAN: 43 1 Year, City, Discipline, sport, Athlete, Country_Code, Gender, Event, Medal 22000, Sydney, Aquatics, Diving, "SAUTIN Dmitry", RUS, Men, \( 10 \mathrm{M} \) Platform, Bronze 3 2000, Sydney, Aquatics, Diving, "TIAN Liang", CHN, Men, \( 10 \mathrm{O} \), Platform, Gold 4 2000, Sydney, Aquatics, Diving, "HU Jia", CHN, Hen, 10M Platform, silver 5 2000, Sydney, Aquatics, Diving, "NONTRINY Anne Katherine", CAN, Women, \( 10 \mathrm{~N} \) Platform, Bronze 6 2000, Sydney, Aquatics, Diving, "'WILKINSON Laura", USA, Women, 10M Platfarm, Gold 7 2000, Sydney, Aquatics, Diving, "LI Na", CHN, Women, \( 10 M \) Platform, Silver 8 2000, Sydney, Aquatics, Diving, "SAUTIN Dmitry", RUS, Men, 3M Springboard, Bronze 92000 , Sydney, Aquatics, Diving, "XTONG Ni", CHN, Men, 3M Springboard, Gold 192000 , Sydney, Aquatics, Diving, "PLATAS Fernanda", MEX, Men, 3M Springboard, Silver 112000 , Sydney, Aquatics, Diving, "LINDNER Doerte", GER, Women, 3M Springboard, Bronze 122000 , Sydney, Aquatics, Diving, "FU Mingxia", CHN, Women, 3M Springboard, Gold 132000 , Sydney, Aquatics, Diving, "GUo Jingjing", CHN, Women, 3M Springboard, Silver 142000 , Sydney, Aquatics, Diving, "HEMPEL Jan", GER, Men, Synchronized Diving 10M Platform, Bronze 152000 , Sydney, Aquatics, Diving, "MEYER Heiko", GER, Men, Synchronized Diving 10M Platform, Bronze 162000 , Sydney, Aquatics, Diving, "LOUKACHINE Igor", RUS, Men, Synchronized Diving 10M Platform, Gold 172000 , Sydney, Aquatics, Diving, "SAUTIN Dmitry", RUS, Men, Synchronized Diving 10M Platform, Gold 182000 , Sydney, Aquatics, Diving, "HU Jia", CHN, Men, synchronized Diving loM Platform, 5ilver 192000 , Sydney, Aquatics, Diving, "TIAN Liang", CHN, Men, Synchronized Diving lon Platform, silver 202000 , Sydney, Aquatics, Diving, "GILMORE Rebecca", AUS, Women, synchronized Diving 10K Platform, Bronze 212000 ,Sydney, Aquatics, Diving, "TouRKY Loudy", AUS, women, Synchronized Diving 10PA Platform, Bronze 22 2000, Sydney, Aquatics, Diving, "LI Na", CHN, Women, synchronized Diving 10K Platform, Gold 232000 , Sydney, Aquatics, Diving, "SANG Xue", CHN, Women, Synchronized Diving 10M Platform, Gold 242000 , Sydney, Aquatics, Diving, "HEYMANS Emilie", CAN, Women, Synchronized Diving \( 10 M \) Platform, Silver 252000 ,Sydney, Aquatics, Diving, "MONTMINY Anne Katherine", CAN, Women, Synchronized Diving 1@M Platform, silver 262000 , Sydney, Aquatics, Diving, "NEWBERY Robert", AUS, Men, Synchronized Diving 3M Springboard, Bronze 272000 , Sydney, Aquatics, Diving, "PULLAR Dean", AUS, Men, Synchronized Diving 3M Springboard, Bronze 282000 , Sydney, Aquatics, Diving, "XIA0 Hailiang", CHN, Men, Synchronized Diving 3M Springboard, Gold 292000 , Sydney, Aquatics, Diving, "XIONG Ni", CHN, Men, Synchranized Diving 3M Springboard, Gold 302000 , Sydney, Aquatics, Diving, "DoBRoSKOK Alexandre", RUS, Men, Synchronized Diving 3M Springboard, Silver 312000 , Sydney, Aquatics, Diving, "SAUTIN Dmitry", RUS, Men, Synchronized Diving 3M 5pringboard, 5ilver 322000 , Sydney, Aquatics, Diving, "SOROKINA Ganna", UKR, Women, 5ynchronized Diving 3M 5pringboard, Bronze 332000 , 5ydney, Aquatics, Diving, "ZHUPINA 0lena", UKR, women, Synchronized Diving 3M Springboard, Bronze 342000, Sydney, Aquatics, Diving, "ILYINA vera", RUS, women, Synchronized Diving 3M 5pringboard, Gold


We have an Answer from Expert

View Expert Answer

Expert Answer


I have implemented the code in python as per the requirements. The code is as follows: import csv with open('medals.csv',
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe