The statement "If pclassview == 1:" calls an error no matter what I change the variable name to and even when I change the above to a normal "input" etc. Please help, Thanks.
viewcinput = False
while viewcinput == False:
pclassview = int(raw_input("Which class scores would you like to view?"))
If pclassview == 1:
inFile = open("ascores.csv", 'r')
print(inFile.read(sorted(reader, key=lambda row: int(row[0]))))
viewcinput = True
If pclassview == 2:
inFile = open("bscores.csv", 'r')
print(inFile.read(sorted(reader, key=lambda row: int(row[0]))))
viewcinput = True
If pclassview == 3:
inFile = open("cscores.csv", 'r')
print(inFile.read(sorted(reader, key=lambda row: int(row[0]))))
viewcinput = True
else:
blank
Aucun commentaire:
Enregistrer un commentaire