Skip to content

Exercise

What to do?

1. Grading System

Design a program that takes a student's score as input and assigns a grade based on the following criteria:

  • Scores 90 and above: Grade 'A'
  • Scores 80-89: Grade 'B'
  • Scores 70-79: Grade 'C'
  • Scores 60-69: Grade 'D'
  • Scores below 60: Grade 'F'
2. Season Identifier

Create a program that determines the season based on a given month number (1-12). Assign each quarter to its corresponding season (Spring: 3-5, Summer: 6-8, Autumn: 9-11, Winter: 12, 1, 2).

3. Menu Selection

Write a menu-based program that displays different options (e.g., 1. Calculate, 2. View Data, 3. Exit) and executes different functionalities based on the user's selection.

4. Age Group Classifier

Develop a program that categorizes a person into different age groups based on their age

  • 0-12: Child
  • 13-19: Teenager
  • 20-59: Adult
  • 60 and above: Senior Citizen
5. Ticket Pricing

Design a program that determines ticket pricing based on a person's age:

  • Under 12 years: Child fare
  • 13-59 years: Adult fare
  • 60 and above: Senior fare