Computer Science, asked by dasrhnaparmar, 26 days ago

write a program to assign gradWrite a program to assign grades (A, B or C) to the students based on the marks

scored by them. The overall marks are 300.​es (A, B, C​

Attachments:

Answers

Answered by chpavithra
2

Answer:

This program is based on Python:

Student=input()

mark=input()

ranks=["NULL", "A", "B", "C", "D", "E"]

if (mark>50):

print("You secured a grade of {0}".format(ranks[int((mark/10)%5)]))

else:

print("you failed in exam")

#grades divided as A B C D E F, F considered minimum marks which i take here as 50, therefore 50 below is F then splitting the remaining grades equally => 250/5 =50

Answered by poojan
12

Complete data:

  • Total marks = 300.
  • If the total marks scored by the student is greater than or equal to 250, print the  statement (Congratulations!!! You have scored A grade).
  • If the total marks scored by the student is greater than or equal to 200 but less than  250, assign grade B, print the statement (Well Done!!! You have scored B  grade).
  • If the total marks scored by the student is less than 200, print the statement (Well Tried!!! You have scored C grade).

Python program:

marks_scored=int(input())     #enter the marks scored by the student

if (marks_scored >= 250):

   print("Congratulations!!! You have scored A grade")

elif (marks_scored >= 200) and (marks_scored < 250):

   print("Well Done!!! You have scored B  grade")

else:

   print("Well Tried!!! You have scored C grade")

Note: You can omit writing marks_scored<250 in elif statement as the interpreter comes to elif only if the if statement becomes false. But, it is good to write for better understanding as a beginner.

Input:

225

Output:

Well Done!!! You have scored B  grade

Learn more:

1. Ch+=2 is equivalent to​

brainly.in/question/21331324

2. A CSS file cannot be linked to a web page. State True or False.

brainly.in/question/21107345

Similar questions