I want to get the scores which the user has to input then order the scores in ascending order however I am struggling to do so. Below is my code so far and it doesn't display the scores in order.Thanks in advance and your help is very much appreciated.
classa = input("what class are you in?")
if classa == "1":
file=open("class 1.csv", "a+")
if classa == "2":
file=open("room2.csv", "a+")
if classa == "3":
file=open("class3.csv", "a+")
score1= int(input("Enter the score 1 results: "))
score2= int(input("Enter the score 2 results: "))
score3= int(input("Enter the score 3 results: "))
newrecord =score1,",",score2,",",score3
file.write(newrecord)
file.write("\n")
file.close()
import csv
import operator
with open('room2.csv','r') as csvfile:
readCSV = csv.reader(csvfile, delimiter=',')
for row in readCSV:
print (row)