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.
defbreakingRecords(scores):# Write your code herehighest_score=Nonelowest_score=Nonehigh_count=0low_count=0foriinrange(len(scores)):ifhighest_scoreisNoneandlowest_scoreisNone:highest_score=scores[i]lowest_score=scores[i]continueifscores[i]>highest_score:highest_score=scores[i]high_count+=1elifscores[i]<lowest_score:lowest_score=scores[i]low_count+=1returnhigh_count,low_count
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 →