005-003-010

Multi-Level Nested Conditions

Hard

Problem Description

Multi-Level Nested Conditions

Learning Objective: Understand three or more levels of nested conditional branching

Overview

Check three conditions in sequence and output specifically only when all are met.

Specifications

  • Initialize score with 85, attendance with 90, project with true
  • Check in order: score >= 60, attendance >= 80, project == true
  • Output "A" if all conditions are met
  • Output "B" if score or attendance is not met
  • Output "C" if project is false

Output Format

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?