subject

Implement report_progress, which is called every time the user finishes typing a word. It takes a list of the words typed, a list of the words in the prompt, the user id, and a send function that is used to send a progress report to the multiplayer server. Note that there will never be more words in typed than in prompt. Your progress is a ratio of the words in the prompt that you have typed correctly, up to the first incorrect word, divided by the number of prompt words. For example, this example has a progress of 0.25: report_progress(["Hello", "ths", "is"], ["Hello", "this", "is", "wrong"], ...) Your report_progress function should return this number. Before that, it should send a message to the multiplayer server that is a two-element dictionary containing the keys 'id' and 'progress'. The id is passed into report_progress from the GUI. The progress is the fraction you compute. Call send on this dictionary to send it to the multiplayer server.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:00
What tool can discover and report computer errors and conflicts that occur when you first turn on a computer and before the operating system?
Answers: 1
question
Computers and Technology, 21.06.2019 17:30
What is force? what are the types of force ? explain all with suitable examples
Answers: 1
question
Computers and Technology, 22.06.2019 12:40
How do i get the most points, without any effort?
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
Martha is designing a single-player game. her manager suggests that she plan the design to incorporate future modifications. which principle of game design relates to planning for future modifications?
Answers: 1
You know the right answer?
Implement report_progress, which is called every time the user finishes typing a word. It takes a li...
Questions
question
Mathematics, 02.04.2021 06:30
question
Chemistry, 02.04.2021 06:30
question
Mathematics, 02.04.2021 06:30
question
Mathematics, 02.04.2021 06:30
question
Mathematics, 02.04.2021 06:30
question
Mathematics, 02.04.2021 06:30
question
Mathematics, 02.04.2021 06:40
Questions on the website: 13722362