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.
def breakingRecords(scores):
# Write your code here
mi = ma = scores[0]
mas=mis=0
for i in scores:
if i > ma:
ma = i
mas+=1
if i < mi:
mi = i
mis+=1
return [mas,mis]
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
def breakingRecords(scores): # Write your code here mi = ma = scores[0] mas=mis=0 for i in scores: if i > ma: ma = i mas+=1 if i < mi: mi = i mis+=1 return [mas,mis]