We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
After all, a for loop that iterates over the input and feeds each parsed number to a function called "logScore". Deeply mysterious.
IF logScore returns true, the corresponding name is added to the dictionary entry for that score, otherwise not. How could that possibly be related to the challenge? The Rosetta Stone to translate this esoteric concept has not been carved.
Sheesh. It's mostly simple Python and a couple of core library functions that have obvious names. There are, to be fair, one or two things that will not be obvious to somebody completely unfamiliar with Python. The underscore is the variable equivalent of /dev/null - here, we're iterating over a range but don't actually care about the individual numbers in the range. Using -1 to index a sequence gives you the last element. List comprehensions used to filter a list (although you'd think the "< score" and "> score" might be a clue). But somebody told me this was a Python tutorial, which might mean that people with some interest in learning the language might try it.
I never had much time for the definition of "old school programmer" that says "Don't learn anything that doesn't look like C and complain if anybody else uses it". Have you considered actually learning the language?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Nested Lists
You are viewing a single comment's thread. Return to all comments →
Truly it is indecipherable.
After all, a for loop that iterates over the input and feeds each parsed number to a function called "logScore". Deeply mysterious.
IF logScore returns true, the corresponding name is added to the dictionary entry for that score, otherwise not. How could that possibly be related to the challenge? The Rosetta Stone to translate this esoteric concept has not been carved.
Sheesh. It's mostly simple Python and a couple of core library functions that have obvious names. There are, to be fair, one or two things that will not be obvious to somebody completely unfamiliar with Python. The underscore is the variable equivalent of /dev/null - here, we're iterating over a range but don't actually care about the individual numbers in the range. Using -1 to index a sequence gives you the last element. List comprehensions used to filter a list (although you'd think the "< score" and "> score" might be a clue). But somebody told me this was a Python tutorial, which might mean that people with some interest in learning the language might try it.
I never had much time for the definition of "old school programmer" that says "Don't learn anything that doesn't look like C and complain if anybody else uses it". Have you considered actually learning the language?