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.
Find the Runner-Up Score!
Find the Runner-Up Score!
Sort by
recency
|
8275 Discussions
|
Please Login in order to post a comment
Python is such a versatile and beginner-friendly programming language. Most bet
n = int(input()) arr = list(map(int, input().split())) max_val = max(arr) arr = [x for x in arr if x != max_val] print(max(arr))
XD
n=int (input() ) scores = list(map(int, input("Enter a list of numbers: ").split())) winner = max(scores) runner_up = max(score for score in scores if score != winner)
print(f"Winner is: {winner}") print(f"Runner-up is: {runner_up}")