-
Notifications
You must be signed in to change notification settings - Fork 0
/
student.py
25 lines (17 loc) · 924 Bytes
/
student.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from functions import in_data, get_progression_outcome
def student_version(): # Function to run student version
heading = 'Student Version' # Set heading
print(heading, '\n' + '-' * len(heading) + '\n') # Print heading and underline
while True: # Loop to get valid inputs from user based on total credits while calling in_data function
pass_credits = in_data('p', 'PASS')
defer_credits = in_data('d', 'DEFER')
fail_credits = in_data('f', 'FAIL')
if pass_credits + defer_credits + fail_credits != 120:
print('Total incorrect\n')
continue # If total credits is not 120, print error message and continue the loop
else:
break # If total credits is 120, break the loop
print(get_progression_outcome(pass_credits, fail_credits)) # Print outcome
'''
Author: Mahima Dharmasena
'''