import webbrowser

student0 = ['student_id\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student1 = ['jkl6150\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student2 = ['jmc8444\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student3 = ['abc0003\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student4 = ['abc0004\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student5 = ['abc0005\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student6 = ['abc0006\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student7 = ['abc0007\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student8 = ['abc0008\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student9 = ['abc0009\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student10 = ['abc0010\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student11 = ['abc0011\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student12 = ['abc0012\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student13 = ['abc0013\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student14 = ['abc0014\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]

student15 = ['abc0015\n',
               '2020, Fall, CMPSC131 100 100 100 100 \n'
               '2020, Fall, MATH140 100 100 100 100 \n'
               '2020, Fall, ENGL015 100 100 100 100 \n'
               '2020, Fall, KINES101 100 100 100 100 \n'
               '2020, Fall, PSU001 100 100 100 100 \n'
               '2020, Fall, COMM100 100 100 100 100 \n'
               ]
def student0_course():       #this is just an example of how the other 15 works
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student0[0])
        gradefile.writelines(student0[1])
        gradefile.close()

def student1_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student1[0])
        gradefile.writelines(student1[1])
        gradefile.close()

def student2_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student2[0])
        gradefile.writelines(student2[1])
        gradefile.close()

def student3_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student3[0])
        gradefile.writelines(student3[1])
        gradefile.close()

def student4_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student4[0])
        gradefile.writelines(student4[1])
        gradefile.close()

def student5_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student5[0])
        gradefile.writelines(student5[1])
        gradefile.close()

def student6_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student6[0])
        gradefile.writelines(student6[1])
        gradefile.close()

def student7_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student7[0])
        gradefile.writelines(student7[1])
        gradefile.close()

def student8_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student8[0])
        gradefile.writelines(student8[1])
        gradefile.close()

def student9_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student9[0])
        gradefile.writelines(student9[1])
        gradefile.close()

def student9_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student9[0])
        gradefile.writelines(student9[1])
        gradefile.close()

def student10_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student10[0])
        gradefile.writelines(student10[1])
        gradefile.close()

def student11_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student11[0])
        gradefile.writelines(student11[1])
        gradefile.close()

def student12_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student12[0])
        gradefile.writelines(student12[1])
        gradefile.close()

def student13_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student13[0])
        gradefile.writelines(student13[1])
        gradefile.close()

def student14_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student14[0])
        gradefile.writelines(student14[1])
        gradefile.close()

def student15_course():
    with open('database.txt','w+') as gradefile:
        read = gradefile.readlines()
        gradefile.write(student15[0])
        gradefile.writelines(student15[1])
        gradefile.close()


def course():
    with open('database.txt', 'r') as gradefile:
        print(webbrowser.open("database.txt"))
        gradefile.close()

student0_course()
course()