This repository contains small Python solutions for programming problems.
runnerUp_score.py reads a list of scores and prints the runner-up score, which is the second-highest unique score in the list.
- Reads the number of scores.
- Reads the score values.
- Removes duplicate scores.
- Sorts the unique scores.
- Prints the second-highest score.
- Python 3.x
No external packages are required.
Run the script from the terminal:
python runnerUp_score.pyExample input:
5
2 3 6 6 5
Example output:
5
Python_ProblemSolver/
|-- README.md
`-- runnerUp_score.py
The script assumes there are at least two unique scores in the input.