Provide the following functions in daily_winners.py: add winnerlist.atscores listot.plavers. listatwinners) O function running should return the list of winners that includes the player from the Uistoplavers with the highest sum total score gixe.Rize(Ustetwianers), returns winner o this function should analyze the list of winners and print out a message for the person whose name appears most often. If there are ties, the winner should be chosen randomly from among those who are tied for the most appearances. The winner's name should also be returned as a string. Sample "give prize" output (use your creativity, it doesn't need to be exactly this on the print output): add winner and giveRrize are as efficient as possible

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
The setting: Daily Winners
An arcade owner asks you for a program to help them out. They want to increase
interest in daily high score winners at each of their arcade game machines, so at the
end of every day they want and to publish a list of players who have gotten the highest
score on that game.
They also want to give a prize to the player who has gotten the most high scores on
different machines for the day. Your program should give a prize to that player - if no
one has gotten more than one high score, choose a winner from the winner's list
randomly.
Write a function that takes in a list of scores from an arcade machine:
[[1, 5, 3, 8, 3], [20, 5], [16, 17, 18]]
And a list of players:
["Rahim", "Avano", "Louisa"]
The first set of scores in the list of scores belongs to the first player in the list of players,
the second list of scores to the second player in the list of players, and so on.
Your function should sum each players' list of scores, and add the player with the
highest sum total score to a list of winners for that day. In the example above, Louisa's
scores sum to the highest total, so her name should be added to the list of winners for
the day.
Transcribed Image Text:The setting: Daily Winners An arcade owner asks you for a program to help them out. They want to increase interest in daily high score winners at each of their arcade game machines, so at the end of every day they want and to publish a list of players who have gotten the highest score on that game. They also want to give a prize to the player who has gotten the most high scores on different machines for the day. Your program should give a prize to that player - if no one has gotten more than one high score, choose a winner from the winner's list randomly. Write a function that takes in a list of scores from an arcade machine: [[1, 5, 3, 8, 3], [20, 5], [16, 17, 18]] And a list of players: ["Rahim", "Avano", "Louisa"] The first set of scores in the list of scores belongs to the first player in the list of players, the second list of scores to the second player in the list of players, and so on. Your function should sum each players' list of scores, and add the player with the highest sum total score to a list of winners for that day. In the example above, Louisa's scores sum to the highest total, so her name should be added to the list of winners for the day.
Provide the following functions in daily_winners.py:
add winnerlist.etscores. listofplavers. listofwinners)
O function running should return the list of winners that includes the player from the
Uistot plavers with the highest sum total score
giveRize(listotwinners), returns winner
o this function should analyze the list of winners and print out a message for the
person whose name appears most often. If there are ties, the winner should be
chosen randomly from among those who are tied for the most appearances. The
winner's name should also be returned as a string.
Sample "give prize" output (use your creativity, it doesn't need to be exactly this on
the print output):
add winner and giveprize are as efficient as possible
Transcribed Image Text:Provide the following functions in daily_winners.py: add winnerlist.etscores. listofplavers. listofwinners) O function running should return the list of winners that includes the player from the Uistot plavers with the highest sum total score giveRize(listotwinners), returns winner o this function should analyze the list of winners and print out a message for the person whose name appears most often. If there are ties, the winner should be chosen randomly from among those who are tied for the most appearances. The winner's name should also be returned as a string. Sample "give prize" output (use your creativity, it doesn't need to be exactly this on the print output): add winner and giveprize are as efficient as possible
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education