PROBLEM 99
Hard

Student Performance Analysis

Programming Basics · Python

</>
STATUS Not solved

TASK

Problem

#99

Given three scores 0..100. Print their average and status: EXCELLENT ≥90, GOOD ≥75, PASS ≥60, otherwise FAIL.

EXAMPLE

Example

Input
90 80 85
Output
85.0 GOOD

LIMITS

Constraints

0≤score≤100
📖
LEARN Theory for this problem
+

`input()` reads data entered by the user. The result of `input()` is initially a string. `split()` separates one input line into individual values using spaces. `map()` applies the specified conversion to each input value. The `+` operator adds numbers. The `/` operator performs regular division and may return a decimal number. Comparison operators `==`, `!=`, `<`, `>`, `<=`, `>=` compare values and produce `True` or `False`. `if` checks a condition and runs its block when the condition is true. `else` runs when the corresponding `if` condition is false. `print()` displays the program result. Print only what the problem statement requires.

**Connection to this task.** An `if` statement chooses a program branch from a Boolean condition. Comparisons produce `True` or `False`, and `elif` lets you test several mutually exclusive cases in order. The expression `avg` shows how this idea is applied to the task data.

💡
NEED HELP? Hints
+

['Compute the average first, then classify it by thresholds.']

ANSWER Solution
+
a, b, c = map(float, input().split())
avg = (a + b + c) / 3
if avg >= 90:
    s = 'EXCELLENT'
elif avg >= 75:
    s = 'GOOD'
elif avg >= 60:
    s = 'PASS'
else:
    s = 'FAIL'
print(avg, s)