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
Ramon is graphing the function  f(x) = 3(4)x. he begins by plotting the initial value. which graph represents his initial step?
Answers: 2
question
Computers and Technology, 24.06.2019 04:30
How do you share someone else’s tweet with your own twitter followers?
Answers: 1
question
Computers and Technology, 24.06.2019 18:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best-suited for this?
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
Jacking is a crime that takes place when a hacker misdirects url to a different site. the link itself looks safe, but the user is directed to an unsafe page
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, 03.02.2021 07:30
question
English, 03.02.2021 07:30
question
Mathematics, 03.02.2021 07:30
question
Chemistry, 03.02.2021 07:30
question
Mathematics, 03.02.2021 07:30
Questions on the website: 13722360