diff --git a/assignment-2.py b/assignment-2.py index 9bea61a..150cffb 100644 --- a/assignment-2.py +++ b/assignment-2.py @@ -28,14 +28,14 @@ def average_marks(): if (i >= 0): marks_withoutAbsent.append(i) else: - break + continue average_calc = sum(marks_withoutAbsent) / total print(f"\n------\nAverage score of {total} students is:\t{average_calc}\n-----") # Option 2 = High and low marks def high_low(): - maxi = marks[0] # Initialize maxi with the first element of the marks list - mini = marks[0] # Initialize mini with the first element of the marks list + maxi = marks[0] # Initialise maxi with the first element of the marks list + mini = marks[0] # Initialise mini with the first element of the marks list for i in range(len(marks)): if (maxi < marks[i] and marks[i] > -1): maxi = marks[i]