Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- """
- Created on Fri May 12 14:36:10 2017
- @author: griffinhigley
- """
- # instances stored in courses dict user srt ID to query
- class course():
- # dict that stores all of the courses key is srt ID
- courses = {}
- def __init__(self,ID , name = 'NONE', year = '0000' ,semester = 'NA' ,gradeScale = 'Normal', instr = 00, roster = dict()):
- self.ID = ID
- self.name = name
- self.year = year
- self.semester = semester
- self.gradeScale = gradeScale
- self.instructor = instr
- self.roster = dict()
- # function that stores all of the course instances into the courses dict key is srt ID
- course.courses[self.ID] = [self.name,self.year,self.semester, self.gradeScale, self.instructor, self.roster]
- if self.ID in course.courses:
- course1 = course.courses[self.ID]
- course.courses[self.ID] = course1
- # user has a dictionary that keeps track of all the instances of the class
- # student, instructor, and administrator all take inheritence from user
- class user():
- # this stores all the instances of the user class
- users = {}
- def __init__(self, ID, firstName, lastName, userType, password, ):
- # user the id to search for user instances in the user dictionary
- self.ID = ID
- self.fisrtName = firstName
- self.lastName = lastName
- self.userType= userType
- self.password = password
- # this puts the instances of the user class into the users dict.
- user.users[self.ID]=[self.fisrtName,self.lastName,self.userType,self.password]
- # this searches a year and semester and lets you know what courses are offered then
- def search_course(self):
- count = 0
- #courseID = str(input('Please enter the course ID followed by the return key.\n'))
- course_year = str(input('Please enter the year you want to seach followed by the return key.\n'))
- course_semester = str(input('Please enter the semester you would like to search in followed by the return key.\n'))
- course_found = False
- # searches all of the courses
- for k in course.courses:
- cours = course.courses[k]
- #cours[1] is the year of the course
- if cours[1] == course_year:
- if cours[2] == course_semester:
- count = count + 1
- print('There is an offering of ', k, course.courses[k])
- course_found = True
- print('we found ', count, 'courses')
- if course_found == False:
- print('No offering found')
- #prints a list of all the course
- def print_courses(self):
- print(course.courses)
- #has a dictionary for all student instances also is put in to the user dict
- class student(user):
- # stores all the student instances use the ID to query
- students = {}
- def __init__(self, ID, firstName, lastName, userType, password, schedual= dict(), grades = dict() ):
- self.ID = ID
- self.fisrtName = firstName
- self.lastName = lastName
- self.userType= userType
- self.password = password
- self.schedual = schedual
- self.grades = dict()
- #puts the students information into the student directory
- student.students[self.ID]=[self.fisrtName,self.lastName,self.userType,self.password, self.schedual]
- user.__init__(self, ID, firstName, lastName, userType, password)
- self.ID = ID
- self.fisrtName = firstName
- self.lastName = lastName
- self.userType= userType
- self.password = password
- # Student course registration function
- def add_class(self):
- courseID = str(input('Please enter the course ID followed by the return key.\n'))
- courseYear = str(input('Enter the year that you would like to take this course\n'))
- courseSemester = str(input('Enter the semester you would like to take this course\n'))
- grade = 'NA'
- if courseID in course.courses:
- courseData = course.courses[courseID]
- if courseData[1] == courseYear and courseData[2] == courseSemester:
- self.schedual[courseID] = [course.courses[courseID], [courseID,grade]]
- print('Course',courseID,'was added to your schedual for that year and semester')
- else:
- print('Sorry',courseID,'is not being offerend for that year and semester\n')
- else:
- print('Sorry',courseID,'was not found in the courses that we offer. Make sure that you typed the ID in correct\n')
- #prints the grades of a student
- def print_grades(self):
- ID = self.ID
- #this is used to grab the grade data from the student class
- stud = student.students[ID]
- classGrades = stud[4]
- print(classGrades)
- #prints the grades that a students got in every course for a year and semester
- def print_class_grade(self):
- Cl = str(input('Please enter the course ID that you would like to see your grade for.\n'))
- clyear = str(input('enter the year you took this course.\n'))
- clsemester = str(input('enter the semester you took this course.\n'))
- studSchedual = self.schedual
- if Cl in studSchedual:
- cour = self.schedual[Cl]
- Cldata = cour
- Clyear = Cldata[1]
- Clsemester = Cldata[2]
- if Clyear == str(clyear) and Clsemester == str(clsemester):
- print(cour)
- else:
- print('looks like you have taken that course just not in the year and semester you entered.\n')
- else:
- print('Looks like you have not taken that course.\n')
- # Prints what courses s tudent is taking
- def print_schedual(self):
- courseYear = str(input('Enter the year that you would like to take this course\n'))
- courseSemester = str(input('Enter the semester you would like to take this course\n'))
- courseFound = False
- for Cl in self.schedual:
- if str(self.schedual[Cl][1]) == courseYear and str(self.schedual[Cl][1]) == courseSemester:
- courseFound = True
- print('You have course',Cl,courseYear,'and',courseSemester)
- if courseFound == False:
- print('You do not seem to have any courses for that year and semester')
- # all of the students
- Connie = student('10001','Connie','Willis','student','Cw1001' )
- Kristine = student('10002','Kristine','Rusch','student','Kr1002')
- Gregory = student('10003','Gregory','Benford','student','Gb1003')
- Carlos = student('10004','Carlos','Hernadez','student','Ch1004')
- Nnedi = student('10005','Nnedi','Okarafor','student','No1005')
- Cartherynne = student('10006','Cartherynne','Valente','student','Cv1006')
- # has a dictionary that stores all the instances also instances are but in the user dict
- class instructor(user):
- # stores all of the instances of the instructors user ID to query
- instructors = {}
- def __init__(self, ID, firstName, lastName, userType, password, schedual = dict()):
- self.ID = ID
- self.fisrtName = firstName
- self.lastName = lastName
- self.userType= userType
- self.password = password
- self.schedual = schedual
- # funtion stores all of the instances in the instructors dict
- instructor.instructors[self.ID]=[self.fisrtName,self.lastName,self.userType,self.password, self.schedual]
- user.__init__(self, ID, firstName, lastName, userType, password)
- self.ID = ID
- self.fisrtName = firstName
- self.lastName = lastName
- self.userType= userType
- self.password = password
- #course.courses[self.ID] = [self.name,self.year,self.semester, self.gradeScale, self.instructor, self.roster]
- # print all of the courses that a instructor is assigned for a given year and semester
- def printCourseLoad(self):
- clyear = str(input('Please enter the year you want to get you schedule for.\n'))
- clsemester = str(input('Enter the semester you want to chech your schedule for\n'))
- for cl in self.schedual:
- if str(self.schedual[cl][2]) == clyear and str(self.schedual[cl][3]) == clsemester:
- print(self.schedual[cl])
- # prints the grades that students have in all of the courses that a instructor is assigned to
- def print_all_course_grades(self):
- courseFound = False
- gradeFound = False
- for cours in course.courses:
- cour = course.courses[cours]
- #print(cour[4])
- #print(self.ID)'
- if str(cour[4]) == self.ID:
- courseFound = True
- for stud in student.students:
- stu = student.students[stud]
- if cours in stu[4]:
- gradeFound = True
- #print('1124124')
- print('------------')
- grad = stu[4]
- print(cours,':',cour[0],':',stu[0],':',grad[cours])
- if courseFound == False:
- print('Looks like you do not have any courses assigned to you\n')
- if gradeFound ==False:
- print('Looks like there are no students in any of your courses\n')
- # Prints the grades that all students have in a course
- def print_course_grades(self):
- studentFound = False
- ClID = str(input('Enter the Course ID that you want to print.\n' ))
- ClYear = str(input('Enter the year you want to print.\n'))
- ClSemeter = str(input('Enter the semester you want to print.\n'))
- if ClID in self.schedual:
- cour = self.schedual[ClID]
- print(cour[1])
- print(cour[2])
- Cldata = cour
- Clyear = Cldata[1]
- Clsemester = Cldata[2]
- if ClYear == Clyear and ClSemeter == Clsemester:
- for stud in student.students:
- stu = student.students[stud]
- if ClID in stu[4]:
- studentFound = True
- print('------------')
- grad = stu[4]
- print(ClID,':',Clyear,':',Clsemester,':',Cldata[0],':',stu[0],':',grad[ClID])
- else:
- print('Looks like you infact do teach this class just not for this semester.\n')
- else:
- print('Sory you can only print the grades of courses that you are the assigned intructor of.\n')
- if studentFound == False:
- print('Looks like there are no students taking this course.\n')
- # assigns grades to all students in a course
- def class_grade_assign(self):
- studFound = False
- print('This will change the grade of every student in the course.\n')
- option = str(input('Are you sure that you want to do this. please enter yes or no.\n'))
- if option.upper() == 'YES':
- Cl = str(input('Please enter the ID of the course that you would like to do a batch assign of grades to.\n'))
- if Cl in self.schedual:
- for ID in student.students:
- stud = student.students[ID]
- classGrades = stud[4]
- if Cl in classGrades:
- studFound = True
- print('student and course found.\n',ID)
- grade = str(input('Please enter the grade you would like this course to have.\n'))
- classGrades[Cl] = grade
- print('Grade change was successful')
- else:
- print('sory but you can only assign grades to students in classes that you teach\n')
- else:
- pass
- if studFound == False:
- print('We did not find any students in that course\n')
- # assigns a grade to a sigle student in a course
- def student_assign_grade(self):
- Cl = str(input('Please enter the ID of the course that you would like to do a batch assign of grades to.\n'))
- ID = str(input('Please enter the ID of the student you wish to assign or change the grade of.\n'))
- if Cl in self.schedual:
- if ID in student.students:
- stud = student.students[ID]
- classGrades = stud[4]
- if Cl in classGrades:
- print('student and course found.\n')
- grade = str(input('Please enter the grade you would like this course to have.\n'))
- classGrades[Cl] = grade
- print('Grade change was successful')
- print(classGrades)
- else:
- print('We found a student with that ID but they do not seem to have that course in their schedule\n')
- else:
- print('There does not seem to be any student with that ID\n')
- else:
- print('Sorry but you can only assign/change the grade of students grades in courses that you are the teacher of.\n')
- #This is for testing
- """def print_schedual(self):
- ClYear = str(input('Enter the year you want to print.\n'))
- ClSemeter = str(input('Enter the semester you want to print.\n'))
- for ClID in self.schedual:
- cour = self.schedual[ClID]
- Cldata = cour
- Clyear = Cldata[1]
- Clsemester = Cldata[2]
- if ClYear == Clyear and ClSemeter == Clsemester:
- print(ClID,':',self.schedual[ClID],':',ClYear,':',Clsemester)
- else:
- print('Looks like you do not have any classes for that year and semester')"""
- # checks to see if a student is taking a course offering
- def see_if_student_in(self):
- ClID = str(input('Enter the Course ID that you want to print (capitalize and integer).\n' ))
- ClYear = str(input('Enter the year you want to print(enter as integer).\n'))
- # do not capitalize
- ClSemeter = str(input('Enter the semester you want to print (Do not capitalize).\n'))
- studentID = str(input('Enter the ID of the student you wish to see if they are in your class(Do not capitalize)'))
- studentFound = False
- if ClID in self.schedual:
- if studentID in student.students:
- if ClID in student.students[studentID][4]:
- sched = student.students[studentID][4]
- for Cl in sched:
- print(sched[Cl])
- cldata = sched[Cl]
- Clyear = cldata[1]
- Clsemester = cldata[2]
- if ClYear == str(Clyear) and ClSemeter == str(Clsemester):
- print(studentID,':',student.students[studentID][0],':',student.students[studentID][1],':','Is in your class',ClID,':','for the year',':',ClYear,':','and semester',':',ClSemeter)
- studentFound = True
- else:
- print('Looks like that student does not have that class for that year and semester\n')
- else:
- print('No student was found with that ID make sure you typed it in correctly\n')
- else:
- print('Sorry but you can only search courses that you are the instructor for\n')
- if studentFound == False:
- print('Student is not in that perticular course offering')
- # print out the students in a course offering
- def print_roster(self):
- studentFound = False
- ClID = str(input('Enter the Course ID that you want to print (capitalize and integer).\n' ))
- ClYear = str(input('Enter the year you want to print(enter as integer).\n'))
- # do not capitalize
- ClSemeter = str(input('Enter the semester you want to print (Do not capitalize).\n'))
- if ClID in self.schedual:
- for studentID in student.students:
- if ClID in student.students[studentID][4]:
- sched = student.students[studentID][4]
- Clyear = sched[ClID][1]
- Clsemester = sched[ClID][2]
- if ClYear == str(Clyear) and ClSemeter == str(Clsemester):
- print(studentID,':',student.students[studentID][0],':',student.students[studentID][1],':','Is in your class',ClID,':','for the year',':',ClYear,':','and semester',':',ClSemeter)
- studentFound = True
- else:
- print('Sorry you can only print our a roster for classes you are teaching. If you are supost to be teaching this course please contact your admin\n')
- if studentFound == False:
- print('Looks like there are not student taking that course\n')
- # prints out what courses a instructor is assignd to for a year and semester
- def print_schedule(self):
- courseYear = str(input('Enter the year that you would like to take this course\n'))
- courseSemester = str(input('Enter the semester you would like to take this course\n'))
- courseFound = False
- for Cl in self.schedual:
- Clyear = self.schedual[Cl][1]
- Clsemester = self.schedual[Cl][2]
- if courseYear == str(Clyear) and courseSemester == str(Clsemester):
- courseFound = True
- print('You have course',Cl,courseYear,'for',courseSemester)
- if courseFound == False:
- print('You do not seem to have any courses for that year and semester')
- # all of the instrucotrs
- Nancy = instructor('1003','Nancy','Kress','instructor','Nk1003')
- Vandana = instructor('1004','Vandana','Simgh','instructor','Vs1004')
- Usman = instructor('1005','Usman','Malik','instructor','Um1005')
- # instances are stored in administrators dict as well as user dict use str ID to query
- class administrator(user):
- # stores all the instances of administrators
- administrators = {}
- def __init__(self, ID, firstName, lastName, userType, password):
- self.ID = ID
- self.fisrtName = firstName
- self.lastName = lastName
- self.userType= userType
- self.password = password
- # function that puts instances of administrator in administrators ditc user str ID to queryS
- administrator.administrators[self.ID]=[self.fisrtName,self.lastName,self.userType,self.password]
- user.__init__(self, ID, firstName, lastName, userType, password)
- self.ID = ID
- self.fisrtName = firstName
- self.lastName = lastName
- self.userType= userType
- self.password = password
- # Creates a course
- def creat_course (self):
- ID = str(input('Please enter the course ID followed by the return key.\n'))
- name = str(input('Please enter the course name followed by the return key.\n'))
- year = str(input('Please enter the course year followed by the return key.\n'))
- semester = str(input('Please enter the course semester followed by the return key.\n'))
- gradeScale = str(input('Please enter the course gradeScale followed by the return key.\n'))
- instructor = str(input('Please enter the course instructor followed by the return key.\n'))
- course.courses[ID] = [name, year, semester, gradeScale, instructor]
- print(course.courses[ID])
- # Modifies the atribuiltes of a course
- def mod_course(self):
- ID = str(input('Please enter the course ID followed by the return key.\n'))
- name = str(input('Please enter the course name followed by the return key.\n'))
- year = str(input('Please enter the course year followed by the return key.\n'))
- semester = str(input('Please enter the course semester followed by the return key.\n'))
- gradeScale = str(input('Please enter the course gradeScale followed by the return key.\n'))
- instructor = str(input('Please enter the course instructor followed by the return key.\n'))
- if ID in course.courses:
- modCourse = course.courses[ID]
- print('Course Found!!!!\n')
- if len(name) != 0:
- modCourse[0] = name
- print('Course name change was successful.\n')
- if len(year) != 0:
- modCourse[1] = year
- print('Course Year change was successful.\n')
- if len(semester) != 0:
- modCourse[2] = semester
- print('Course semester change was successful.\n')
- if len(gradeScale) != 0:
- modCourse[3] = gradeScale
- print('Course gradeScale change was successful.\n')
- if len(instructor) != 0:
- modCourse[4] = instructor
- print('Course instructor change was successful.\n')
- print('Course Mods where successful.\n')
- print(ID,course.courses[ID])
- else:
- print('looks like that course in not in the catalog yet\n if you would like to add it please call the add course function')
- # Changes the grade that a student has in a course
- def change_grade(self):
- ID = str(input('Please enter the ID of the student you wish to change the grade of.\n'))
- Cl = str(input('Please enter the course ID for the course you wish to change the grade.\n'))
- if ID in student.students:
- stud = student.students[ID]
- classGrades = stud[4]
- if Cl in classGrades:
- print('student and course found.\n')
- grade = str(input('Please enter the grade you would like this course to have.\n'))
- classGrades[Cl] = grade
- print('Grade change was successful')
- print(classGrades)
- # prints the grades that all the students have in a course
- def print_cl_grades(self):
- print('Some students may not have grades yet if that is the case then you will get back all the information about that student and course\n')
- courseID = str(input('Enter the ID of the course you would like to print all the grades of.\n'))
- ClYear = str(input('Enter the year you want to print(enter as integer).\n'))
- # do not capitalize
- ClSemester = str(input('Enter the semester you want to print (Do not capitalize).\n'))
- for ID in student.students:
- stud = student.students[ID]
- schedual = stud[4]
- if courseID in schedual:
- Cldata = schedual[courseID]
- Clyear = Cldata[1]
- Clsemester = Cldata[2]
- if ClYear == str(Clyear) and ClSemester == str(Clsemester):
- grade = schedual[courseID]
- name = stud[0:3]
- print(ID,name, grade)
- #self.schedual[courseID] = [course.courses[courseID], [courseID,grade]]
- # prints out the grades of a signle student in all of there classes
- def print_stud_grades(self):
- stuID = str(input('Enter the Id of the student you want to print the grades of.\n'))
- if stuID in student.students:
- stu = student.students[stuID]
- print(stuID,':',stu[0],':',stu[1],':',stu[4])
- # prints the grades that students have in all of a signle instructors coures
- def print_inst_grades(self):
- instID = str(input('Enter the ID of the instructor you to print class grades of.\n'))
- if instID in instructor.instructors:
- inst = instructor.instructors[instID]
- instSched = inst[4]
- print(instSched)
- # assigns a course to an instructor
- def assign_inst_course(self):
- instID = str(input('Enter the ID the instructor you would like to assign a course to.\n'))
- if instID in instructor.instructors:
- inst = instructor.instructors[instID]
- instSched = inst[4]
- courseID = str(input('enter the ID of the course you would like to add to their schedual.\n'))
- if courseID in course.courses:
- cour = course.courses[courseID]
- cour[5] = str(instID)
- instSched[courseID] = course.courses[courseID]
- print(instSched, cour[5],course.courses[courseID],'made it')
- # admins
- Leigh = administrator('1001','Leigh','Brackett','administrator','Lb1001')
- Isaac = administrator('1002','Isaac','Asimov','administrator','Ia1002')
- # all of the courses
- CSCI1004 = course('CSCI1004','A Weakly Typical Python', '2016', 'fall', 'Pass Fail', '1004' )
- CSCI2004 = course('CSCI2004','The Objective of the Caml', '2016', 'fall', 'Normal','1004' )
- POLS2701 = course('POLS2701','The Meaning of the Constitution')
- HUMN2211 = course('HUMN2211','Living the Liberal Arts')
- PHIL3333 = course('PHIL3333','The Objective Truth' ,'2017','spring','Normal','1005')
- BIOS3791 = course('BIOS3791','Living System' )
- ENGR4792 = course('ENGR4792','Systems Living','2017','fall','normal','1005')
- PHIL4797 = course('PHIL4797','Living Systemically')
- # given data
- #teachers
- Vandana.schedual['CSCI1004'] = course.courses['CSCI1004']
- Usman.schedual['PHIL3333'] = course.courses['PHIL3333']
- Usman.schedual['ENGR4792'] = course.courses['ENGR4792']
- #students
- Connie.schedual['CSCI1004'] = course.courses['CSCI1004']
- Kristine.schedual['CSCI1004'] = course.courses['CSCI1004']
- Gregory.schedual['CSCI1004'] = course.courses['CSCI1004']
- Carlos.schedual['CSCI1004'] = course.courses['CSCI1004']
- Nnedi.schedual['CSCI1004'] = course.courses['CSCI1004']
- Cartherynne.schedual['CSCI1004'] = course.courses['CSCI1004']
- Connie.schedual['PHIL3333'] = course.courses['PHIL3333']
- Kristine.schedual['PHIL3333'] = course.courses['PHIL3333']
- Gregory.schedual['PHIL3333'] = course.courses['PHIL3333']
- Carlos.schedual['PHIL3333'] = course.courses['PHIL3333']
- Nnedi.schedual['PHIL3333'] = course.courses['PHIL3333']
- Cartherynne.schedual['PHIL3333'] = course.courses['PHIL3333']
- Connie.schedual['ENGR4792'] = course.courses['ENGR4792']
- Kristine.schedual['ENGR4792'] = course.courses['ENGR4792']
- Gregory.schedual['ENGR4792'] = course.courses['ENGR4792']
- Carlos.schedual['ENGR4792'] = course.courses['ENGR4792']
- Nnedi.schedual['ENGR4792'] = course.courses['ENGR4792']
- Cartherynne.schedual['ENGR4792'] = course.courses['ENGR4792']
- # login
- def login():
- global userID
- name = str(input('Please Enter your first name.\n'))
- userID = str(input("Please enter your ID followed by the return key.\n"))
- password = str(input('Please enter your password followed by the return key.\n'))
- #checks if a user is in the dict
- if userID in user.users:
- print('Checking')
- usercall = user.users[userID]
- userType = usercall[2]
- # check password
- if password == usercall[3]:
- print('Logedin as:',userType,name,usercall[1],userID)
- #checks user type and pulls user info
- if userID in administrator.administrators :
- usercall = administrator.administrators[userID]
- #creats a new object with all the data
- User = administrator(userID,usercall[0],usercall[1],userType,usercall[3])
- main(User,userType)
- return userType
- elif userID in instructor.instructors:
- usercall = instructor.instructors[userID]
- schedule = usercall[4]
- User = instructor(userID,usercall[0],usercall[1],userType,usercall[3],schedule)
- main(User,userType)
- return userType
- elif userID in student.students:
- userType ='student'
- usercall = student.students[userID]
- schedule = usercall[4]
- User = student(userID,usercall[0],usercall[1],userType,usercall[3],schedule)
- main(User,userType)
- return userType
- else:
- print('Sorry ID or Password did not match please check you typed it in right and try again.\n')
- choice = str(input('Would you like to try again\n\
- [0]Yes\n\
- [1]No\n'))
- if choice == '0':
- login()
- elif choice =='1':
- pass
- else:
- print('Well that was not one of the optoins but we think that you ment No')
- # the main program this is when you interact with the data
- def main(User,userType):
- while True:
- if userType == 'student':
- choose = input('What do you wish to do? \n\
- [0] See what courses are going to be offered for a year and semester\n\
- [1] Print list of all courses\n\
- [2] Register for a course \n\
- [3] Print all of your grades\n\
- [4] Print a specific courses grades \n\
- [L] Logout / End session\n\
- [Q] Quit\n\n>>').upper()
- if choose == '0':
- User.search_course()
- elif choose == '1':
- User.print_courses()
- elif choose == '2':
- User.add_class()
- elif choose == '3':
- User.print_grades()
- elif choose == '4':
- User.print_class_grade()
- elif choose == 'Q':
- break
- elif choose =='L':
- login()
- break
- if userType == 'instructor':
- choose = input('What do you wish to do? \n\
- [0] Print grades of all students in all courses in your schedule\n\
- [1] Print the grades the students in all your courses have\n\
- [2] Asign all students in a course a grade\n\
- [3] See if a student is in one of your courses\n\
- [4] Print Roster \n\
- [5] Print schedule \n\
- [6] Print schedule \n\
- [L] Logout / End session\n\
- [Q] Quit\n\n>>').upper()
- if choose == '0':
- User.print_all_course_grades()
- elif choose == '1':
- User.print_course_grades()
- elif choose == '2':
- User.class_grade_assign()
- elif choose == '3':
- User.see_if_student_in()
- elif choose == '4':
- User.print_roster()
- elif choose == '5':
- User.print_schedule()
- elif choose == '6':
- User.student_assign_grade()
- elif choose == 'Q':
- break
- elif choose =='L':
- login()
- break
- if userType == 'administrator':
- choose = input('What do you wish to do? \n\
- [0] Assign an instructor a course\n\
- [1] Print out the grades that students have in all of a instructors courses\n\
- [2] Print out a particular students grades \n\
- [3] Print out all of grades for a particular course\n\
- [4] Change a students grade in a course \n\
- [5] Create a course \n\
- [6] Change a course \n\
- [7] Search for a course \n\
- [8] Batch assign al studnets in a particular course a grade \n\
- [L] Logout / End session\n\
- [Q] Quit\n\n>>').upper()
- if choose == '0':
- User.assign_inst_course()
- elif choose == '1':
- User.print_inst_grades()
- elif choose == '2':
- User.print_stud_grades()
- elif choose == '3':
- User.print_cl_grades()
- elif choose == '4':
- User.change_grade()
- elif choose == '5':
- User.creat_course()
- elif choose == '6':
- User.mod_course()
- elif choose == '7':
- User.search_course()
- elif choose == 'Q':
- break
- elif choose =='L':
- login()
- break
- login()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement