<prompt> Unapewa integer safu alama ya ukubwa n, ambapo alama i ni alama ya mwanariadha ith katika mashindano. alama zote ni uhakika wa kuwa ya kipekee. wanariadha ni kuwekwa kulingana na alama zao, ambapo 1 nafasi mwanariadha ina alama ya juu, 2 nafasi mwanariadha ina alama ya juu ya 2, na kadhalika. uwekaji wa kila mwanariadha huamua cheo yao: - 1 nafasi mwanariadha daraja ni Medali ya Dhahabu. - 2 nafasi mwanariadha daraja ni Medali ya Fedha. - 3 nafasi mwanariadha daraja ni Medali ya shaba. - Kwa nafasi ya 4 kwa nafasi mwanariadha, cheo yao ni namba yao ya uwekaji yaani, nafasi ya x mchezaji x.  <response>: You can start by creating an empty dictionary to store each athletes score as the key and their rank as the value. Then, sort the given array in descending order and iterate through it. For the first 3 athletes, assign their respective medals as their rank. For the rest of the athletes, use their placement number as their rank. Finally, populate the answer array with each athletes rank using the dictionary. Heres the code:def findRanksscore: rank_dict for i in rangelenscore: rank_dictscorei 0 sorted_scores sortedscore, reverseTrue for i in rangelensorted_scores: if i 0: rank_dictsorted_scoresi Gold Medal elif i 1: rank_dictsorted_scoresi Silver Medal elif i 2: rank_dictsorted_scoresi Bronze Medal else: rank_dictsorted_scoresi stri1 answer for i in rangelenscore: answer.appendrank_dictscorei return answerYou can then call findRanks with an array of scores, like this:scores 10, 5, 15, 20, 25ranks findRanksscoresprintranks outputs Silver Medal, 5, Bronze Medal, Gold Medal, 1 