Write a program to read the marks and assign a grade to a student. Grading system: A (>=90), B (80–89), C (70–79), D (60–69), E (50–59), F (<50). (Use the Switch case)

Computer Bits Daily
2 min readMay 14, 2023

Write a program to read the marks and assign a grade to a student. Grading system: A (>=90), B (80–89), C (70–79), D (60–69), E (50–59), F (<50). (Use the Switch case)

Python Program to Read Marks and Assign a Grade to a Student

Introduction

In this blog post, we will learn how to write a Python program to read marks and assign a grade to a student. We will use the switch case statement to assign grades based on the marks obtained by the student. The grading system will be as follows: A (>=90), B (80–89), C (70–79), D (60–69), E (50–59), F (<50).

https://play.google.com/store/apps/details?id=com.computerdictionary.mcqtutorial.computerbitspradip

Table of Contents

  • Understanding the Grading System
  • Writing the Python Program
  • Testing the Program

Understanding the Grading System

Before we start writing the program, let’s understand the grading system. The grading system is based on the marks obtained by the student. The grades are assigned as follows:

  • A (>=90)
  • B (80–89)
  • C (70–79)
  • D (60–69)
  • E (50–59)
  • F (<50)

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Computer Bits Daily
Computer Bits Daily

Written by Computer Bits Daily

Learning Computer skills and Computer technology by learning and sharing

No responses yet

Write a response