← Back to Dictionaries
Question 290
Highest Grade And Who
Highest Grade And Who
Find who has the highest score in the dict scores with a loop and no max: keep the best value seen so far and the name it belongs to, replacing both whenever a larger value turns up. Print the result in the form <name> has the highest score: <value>. Input: none. Output: one line.
Expected Output:
omar has the highest score: 92= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
Dictionaries
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.