I am trying to write a program that 1. Lets the user write new students and there overall grade to the file, 2. Opens the file to view course info(student and their grade) 3. Shows course stats(mean and range for the class). Here is what I have so far, can someone help me out...I'm stuck and don't know where to go from here.
def main(): filename1 = input("What is the file name?") file1 = open(filename1, "a") file1.close() choice = input("Please enter the number for your choice or press <enter> to quit\n\n1.) Add a student to File\n2.) Display course info\n3.) Display course stats.") if choice == '1': studentName = input("What is the student's name?") elif choice == '2': function_2()#should open file to read file elif choice == '3': function_3()#display results from arithmetic mean and range for the course file1 = open(filename1,"a") file1.write(myInfo + "," ",\n" ) file1.close() if __name__ == '__main__': main()