HackerRank- Python Find the Runner-Up Score!

Given the participants' score sheet for your University Sports Day, you are required to find the runner-up score. You are given N scores. Store them in a list and find the score of the runner-up.

  1. if __name__ == '__main__':
  2. n = int(input())
  3. arr = list(map(int, input().split()))
  4. zes = max(arr)
  5. i=0
  6. while(i<n):
  7. if zes ==max(arr):
  8. arr.remove(max(arr))
  9. i+=1
  10. print(max(arr))
Please click on the like button if it worked

Solution not working or have any suggestions? Please send an email to [email protected]

donate a cup of tea :)

Join Our Facebook Group

Share this solution


Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube