main
This commit is contained in:
@@ -15,7 +15,10 @@ try:
|
|||||||
if subject_edit:
|
if subject_edit:
|
||||||
subject_edit.add_grade_category(user_input[3], user_input[4])
|
subject_edit.add_grade_category(user_input[3], user_input[4])
|
||||||
elif user_input[1] == "subject":
|
elif user_input[1] == "subject":
|
||||||
subjects.append(subject.Subject(user_input[2], _, _))
|
subjects.append(subject.Subject(user_input[2], user_input[3], user_input[4]))
|
||||||
|
elif user_input[0] == "output":
|
||||||
|
subject_get = subject.get_subject(subjects, user_input[1])
|
||||||
|
user_IO.user_output(subject_get.)
|
||||||
raise SystemError
|
raise SystemError
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
+16
-1
@@ -10,7 +10,17 @@ def user_input():
|
|||||||
user_add = input()
|
user_add = input()
|
||||||
if user_add == "subject":
|
if user_add == "subject":
|
||||||
subject = input("Which subject do you want to add? \n")
|
subject = input("Which subject do you want to add? \n")
|
||||||
return "input", "subject", subject
|
main_subject = input("Is this subject a main subject (Hauptfach)[y/n]? \n")
|
||||||
|
if main_subject == 'y':
|
||||||
|
main_subject = True
|
||||||
|
elif main_subject == 'n':
|
||||||
|
main_subject = False
|
||||||
|
oral_exam = input("Will there be an oral exam in this subject [y/n]? \n")
|
||||||
|
if oral_exam == 'y':
|
||||||
|
oral_exam = True
|
||||||
|
elif oral_exam == 'n':
|
||||||
|
oral_exam = False
|
||||||
|
return "input", "subject", subject, main_subject, oral_exam
|
||||||
elif user_add == "category":
|
elif user_add == "category":
|
||||||
subject = input("To which subject do you want to add the category? \n")
|
subject = input("To which subject do you want to add the category? \n")
|
||||||
category = input("Which category do you want to add? \n")
|
category = input("Which category do you want to add? \n")
|
||||||
@@ -22,3 +32,8 @@ def user_input():
|
|||||||
grade = input("Grade? \n")
|
grade = input("Grade? \n")
|
||||||
grade_name = input("What's the name of the grade? \n")
|
grade_name = input("What's the name of the grade? \n")
|
||||||
return "input", "grade", subject, category, grade, grade_name
|
return "input", "grade", subject, category, grade, grade_name
|
||||||
|
|
||||||
|
|
||||||
|
def user_output(i):
|
||||||
|
# just filled with some standard output, has to be filled further
|
||||||
|
print(i)
|
||||||
Reference in New Issue
Block a user