005-003-005
Nested if Statements: Grade Evaluation System
Medium
Problem Description
Nested if Statements: Grade Evaluation System
In this problem, you will create a program that receives a score and attendance rate as input, evaluates them in order using nested if statements, and displays the resulting grade (A/B/C/F or Attendance insufficient) to standard output.
Learning Objective: Understand how to implement complex conditional branching using nested if statements
Overview
Input score and attendance rate, then determine the grade using nested if statements.
Specifications
- If attendance rate is below 80%: "Attendance insufficient"
- If attendance rate is 80% or above:
- Score 90+: "A"
- Score 70+: "B"
- Score 50+: "C"
- Otherwise: "F"
Input
Score and attendance rate (%) are provided
Output Format
Grade: A
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up