Merge branch 'master' into exceptions

This commit is contained in:
lade043
2019-08-02 18:58:26 +02:00
committed by GitHub
3 changed files with 11 additions and 22 deletions
+2 -7
View File
@@ -49,17 +49,12 @@ def user_output(subject, categories, average, average_subject):
for counter, category in enumerate(categories):
print("The average in {} is {} with these grades:".format(category, average[counter]))
string = ""
for grade in categories[category]:
string += str(grade) + ", "
for grade in categories[category][0]:
string += str(grade.grade) + ", "
print(string + "\n")
print("The average of {} is {}.".format(subject, average_subject))
def password():
print("What is your password?")
return input()
def exception_raised(exception):
print("Dear user you've raised an exception. The cause of the exception is:")
if exception is exceptions.SubjectNotExistingException: