Knowee
Questions
Features
Study Tools

Accept the grades from the user and display the grade according to the following criteria:Below 25 --D25 to 45  -- C45 to 50 -- B50 to 60 --B+60 to 80 -- AAbove 80 -- A+

Question

Accept the grades from the user and display the grade according to the following criteria:Below 25 --D25 to 45  -- C45 to 50 -- B50 to 60 --B+60 to 80 -- AAbove 80 -- A+

🧐 Not the exact question you are looking for?Go ask a question

Solution

Sure, here is a simple Python program that accepts grades from the user and displays the grade according to the given criteria:

# Accept the grade from the user
grade = float(input("Enter your grade: "))

# Display the grade according to the criteria
if grade < 25:
    print("Your grade is D")
elif 25 <= grade < 45:
    print("Your grade is C")
elif 45 <= grade < 50:
    print("Your grade is B")
elif 50 <= grade < 60:
    print("Your grade is B+")
elif 60 <= grade < 80:
    print("Your grade is A")
else:
    print("Your grade is A+")

This program first asks the user to input their grade. It then checks which range the grade falls into using if-elif-else statements, and prints the corresponding grade.

This problem has been solved

Similar Questions

A school has following rules for grading system:           a. Below 25 - F               b. 25 to 45 - E             c. 45 to 50 - D               d. 50 to 60 - C          e. 60 to 80 - B              f. Above 80 -    A                                                                                                                     Ask user to enter marks and print the corresponding grade.

As a python student, write a program using functions and conditions to display the grades that the students will be receiving. The grades are:90% - 100%  Grade is A 80% - 89% Grade is  B70% - 79% Grade is C                                                        60% - 69%  Grade is D                   50% - 59%    Grade is E   <50% Fail

Write a Java program that determines a student’s grade. The program will read three types ofscores(quiz, mid-term, and final scores) and determine the grade based on the following rules: -if theaverage score >=90% =>grade=A -if the average score >= 70% and <90% => grade=B -if theaverage score>=50% and <70% =>grade=C -if the average score<50% =>grade=F

Problem StatementA computer science teacher assigned the students a programming task that calculates and displays grades based on test marks. The teacher wants the program to take a student's test mark as input and determine their grade using the following criteria:If the mark is between 90 and 100 (inclusive), assign grade A.If the mark is between 80 and 89 (inclusive), assign grade B.If the mark is between 70 and 79 (inclusive), assign grade C.If the mark is between 60 and 69 (inclusive), assign grade D.If the mark is between 45 and 59 (inclusive), assign grade E.For marks below 45 assign grade F.If the mark is greater than 100 or a negative number, it displays "Invalid input". Help the students to accomplish the given task.Note: This question helps in clearing AMCAT exam.Input format :The input consists of a single integer, representing the student's mark.Output format :The output displays "Grade: " followed by the grade for the given mark based on the given criteria.If the mark is greater than 100 or a negative number, the output displays "Invalid input".Refer to the sample output for the formatting specifications.Code constraints :In the given scenario, the test cases fall under the following constraints:0 ≤ student's mark ≤ 100Sample test cases :Input 1 :100Output 1 :Grade: AInput 2 :85Output 2 :Grade: BInput 3 :79Output 3 :Grade: CInput 4 :63Output 4 :Grade: DInput 5 :56Output 5 :Grade: EInput 6 :0Output 6 :Grade: FInput 7 :-5Output 7 :Invalid inputInput 8 :126Output 8 :Invalid input

12 Fill the Status column if the student score less than 30 then Fail if the score is between 31 to 50 Pass If the score is between 51 to 60 Third_Class, 61 to 70 Second_Class, and above 70 First_class.write excel formula grade present in e5 cell

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.