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.
best = 0
least = 0
for i in range(1,len(scores)):
if scores[i] > best_score:
best_score = scores[i]
best += 1
elif scores[i] < least_score:
least_score = scores[i]
least +=1
return(best,least)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Breaking the Records
You are viewing a single comment's thread. Return to all comments →
python 3
def breakingRecords(scores): least_score = scores[0] best_score = scores[0]