scores = [100, 90, 80] new_score = 90 limit = 10 rank = 1 for s in scores: if s > new_score: rank += 1 if rank > limit: rank = -1 print(rank)
To embed this project on your website, copy the following code and paste it into your website's HTML: