In services.py
Write a function, total_score(a: int, b: int, c: int), that takes three test scores and returns their total.
In services.py
Write a function, average_score(a: int, b: int, c: int), that takes three test scores and returns the average of the three scores.
In services.py
Write a function, performance_level(avg: float), that takes the average score and returns a number representing performance:
- return 3 if avg is above 80
- return 2 if avg is between 50 and 80 (including both)
- return 1 otherwise
In services.py
Write a function, bonus_points(level: int), that gives extra points based on performance level:
- if level is 3, return 5 bonus points
- if level is 2, return 2 bonus points
- if level is 1, return 0 bonus points
In main.py
Write a function, final_score(a: int, b: int, c: int), that takes three test scores and returns final score, which is the sum of average three test score and the bonus. The bonus should be calculated as follows:
- if average score is above 80, student gets 5 bonus points
- if average score is between 50 and 80 (including both), student gets 2 bonus points
- if average score is below 50 student doesn't get any bonus point
In main.py
Write a function, report(a: int, b: int, c: int),
that prints the student's average, performance level, and final score
in a simple numeric report. Example:
Scores = 70, 80, 90
Average: 80
Level: 3
Final Score: 85