Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scores = int(input('Enter the number of scores: '))
- inp = input('Enter the scores : ').split(' ')
- array = []
- new_list = []
- max = 0
- for i in inp:
- array.append(int(i))
- array.sort()
- for i in array:
- if scores < len(array) or scores > len(array):
- print('Number of Scores does not conform with the scores you input')
- break
- if scores not in range(2,11):
- break
- elif i > max:
- max = i
- new_list.append(max)
- print(new_list[-2])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement