#Q05FINISHED
largest=0
secondlargest=0
thirdlargest=0

libraryRecord =  [
["105MS" , "Marcus" , "Smith" , 25 ],
["103AZ" , "Anthony" , "Zarrent" , 5 ],
["108MW" , "Matt" , "White" , 12 ],
["112DB" , "Denise" , "Bilton" , 58 ],
["124MK" , "Malcolm" , "Kelly" , 26 ],
["116UK" , "Uzere" , "Kevill" , 29 ],
["127AL" , "Abduraheim" , "Leahy" , 94 ],
["124LS" , "Laura" , "Sampras" , 50 ],
["121AP" , "Azra" , "Potter" , 61 ],
["115AC" , "Anthony" , "Calik" , 10 ],
["117PI" , "Pablo" , "Iilyas" , 49 ],
["113MM" , "Mark" , "Montgomerie" , 68 ],
["130FH" , "Felicity" , "Heath" , 11 ],
["132JA" , "Jill" , "Alexander" , 61 ],
["123SG" , "Sara" , "Grimstow" , 9 ],
["134KD" , "Kevin" , "Dawson" , 74 ],
["122AB" , "Andrew" , "Bertwistle" , 42 ],
["125JF" , "Jaide" , "Feehily" , 55 ],
["128JS" , "Justin" , "Slater" , 68 ],
["126CG" , "Colleen" , "Grohl" , 39 ]
]
# ----------------------------------------------
# Write your code below this line
totalbook = 0
averagebook = 0
lessthan10=0
gold=0
silver=0
bronze=0

for student in libraryRecord:
    totalbook=totalbook+student[3]
    if student[3]<10:
        lessthan10=student[0],student[3]
        print(f"Student reading Less Than 10 books {lessthan10}")
    elif student[3]>largest:
        secondlargest=largest
        largest=student[3]
        gold=student[0]
    elif student[3]>secondlargest:
        thirdlargest=secondlargest
        bronze=silver
        secondlargest=student[3]
        silver=student[0]
averagebook=totalbook/len(libraryRecord)
print(f"Total Book {totalbook}")
print(f"Average Book {averagebook}")
print(f"Largest {largest} and {gold}")
print(f"Second Largest {secondlargest} and {silver}")
print(f"Third Largest {thirdlargest} and {bronze}")
