From 93c9c9d33cfe12903eb584644bc5088a2dfa4aed Mon Sep 17 00:00:00 2001 From: tstst334 Date: Fri, 2 Aug 2019 15:48:06 +0200 Subject: [PATCH 1/3] password --- user_IO.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user_IO.py b/user_IO.py index 2f31563..7ba55ba 100644 --- a/user_IO.py +++ b/user_IO.py @@ -43,6 +43,7 @@ def user_output(subject, categories, average, average_subject): print(string + "\n") print("The average of {} is {}.".format(subject, average_subject)) + def password(): print("What is your password?") - return input() \ No newline at end of file + return input() From 16cb42203d75c98091f9c5ed2d3d005064c375b5 Mon Sep 17 00:00:00 2001 From: tstst334 Date: Fri, 2 Aug 2019 15:52:16 +0200 Subject: [PATCH 2/3] break --- main.py | 2 ++ user_IO.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index d4b1b2e..3514075 100644 --- a/main.py +++ b/main.py @@ -30,6 +30,8 @@ try: _subject = user_input[1] subject_get = subject.get_subject(subjects, _subject) user_IO.user_output(subject_get.return_average_subject) + elif input_or_output == "exit": + break raise SystemError except Exception as e: diff --git a/user_IO.py b/user_IO.py index 7ba55ba..bc1ea2e 100644 --- a/user_IO.py +++ b/user_IO.py @@ -1,5 +1,5 @@ def user_input(): - todo = input("Ok, do you want to see them or to edit them [see/edit]?\n") + todo = input("Ok, do you want to see them or to edit them [see/edit/exit]?\n") if todo == "see": print("Which subject do you want to know the information?") subject = input() @@ -31,6 +31,8 @@ def user_input(): grade = input("Grade? \n") grade_name = input("What's the name of the grade? \n") return "input", "grade", subject, category, grade, grade_name + elif todo == "exit": + return "exit" def user_output(subject, categories, average, average_subject): From 97541f8cd344bf134425bbf7be7407f463d80797 Mon Sep 17 00:00:00 2001 From: tstst334 Date: Fri, 2 Aug 2019 15:53:09 +0200 Subject: [PATCH 3/3] break --- main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/main.py b/main.py index 3514075..d569468 100644 --- a/main.py +++ b/main.py @@ -36,4 +36,3 @@ try: except Exception as e: print('ERROR' + str(e)) -