Added bounds checking for the correct_index in each question.
Randomized the answer choices in addition to the questions.
Improved input validation in select_test() with retry limits.
Improved formatting of the score percentage.
Handled logging instead of raw print in certain cases.