1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sineoko [7]
3 years ago
9

Write a program that prints the Grade based on the given data. 95-100: A+ 90-94: A 80-89: B+ 70-79: B 60-69: C+ 50-59: C <49

: F Input: 50 | Output: C python
Computers and Technology
1 answer:
mr Goodwill [35]3 years ago
8 0

Answer:

The program to this question as follows:

Program:

score=int(input("Enter your percentage: ")) #input grade by user

#using conditional statement for match condition  

if 95<=score <= 100: #if value in between 95 to 100

   grade = 'A+' #assign grade

elif 90 <=score <= 94: #elif value in between 90 to 94

   grade = 'A' #assign grade

elif 80 <=score <= 89:  #elif value in between 80 to 89

   grade = 'B+' #assign grade

elif 70 <=score <= 79:  #elif value in between 70 to 79

   grade = 'B' #assign grade

elif 60 <=score <= 69:  #elif value in between 60 to 69

   grade = 'C+' #assign grade

elif 50 <=score <= 59:  #elif value in between 50 to 59

   grade = 'C' #assign grade

elif score<49 :  #elif value is less then 49

   grade = 'F' #assign grade

print (grade) #print grade

Output:

Enter your percentage: 50

C

 Explanation:

In the above python code, a variable "score" is defined, this variable is used for taking value from the user end. In the next step if-elif-else conditional statement is used, this statement is used when a group of statements is given in which one is true. The if block check score value is between 95-100 if this is true it will print A+.

In elif block if the above condition is not true, then this condition will execute, in this block, there are multiple elif block is used that can be described as follows:

  • In the first block, if the value in between 90-94. It will print A.
  • In the second block, if the value in between 80-89. It will print B+.
  • In the third block, if value in between 70-79. It will print B.
  • In the fourth block, if value in between 60-69. It will print C+.
  • In the fifth block, if value in between 50-59. It will print C.
  • In the last, if the value of the score is less then 49. It will print F.
You might be interested in
Clara works behind a computer all day. She gets a lot of headaches, and her eyes have been hurting her lately. Her doctor diagno
Vinil7 [7]

Answer:

Clara should use computer lenses and artifical tears.

The computer lenses help block blue light from entering your eyes which would help with the headaches and help you focus on something further away. The artificial tears help lubricate dry eyes which prevents or in Clara's case, reduces/relieves eye strain.

8 0
2 years ago
True or False: if there are multiple operations inside a parentheses, you do not need to complete theses in the order of pemdas​
damaskus [11]

I believe this is false.

Happy to help.

5 0
4 years ago
A ______ oversees the planning and implementation of sophisticated security measures to block unauthorized access but at the sam
meriva
A-database administrator
8 0
3 years ago
For his class project, Matt has to create an image in a color scheme that has shade or tint variations of the same hue. Which co
Alex

Answer:

B.Monochromatic

Explanation:

mono means one

5 0
3 years ago
To create a formula, click the cell where you want to add the formula and press the _____ key.
tigry1 [53]
C.........is the answer
8 0
3 years ago
Other questions:
  • If Maya wants to access a view that would control multiple slides within a presentation, which view should she utilize? Master v
    9·1 answer
  • Why is it critical to provide proper treatment for minor and moderate sports injuries within the first 48 hours after sustaining
    14·1 answer
  • Please reply only in CORAL. I am not sure how to get the numbers between the negative version and positive version of the input
    10·1 answer
  • Explain the difference between the term graphic communication and printing
    7·1 answer
  • If a suspect is not read his or her Miranda rights, then nothing the suspect says can be used at trial, even if the suspect volu
    11·1 answer
  • What are three reasons teens might start drinking alcohol??
    7·2 answers
  • Find and fix the error in the if-else statement. import java.util.Scanner;
    11·2 answers
  • Imagine you had a learning problem with an instance space of points on the plane and a target function that you knew took the fo
    11·1 answer
  • What is the first step to apply the line and page breaks options to groups of paragraphs in a Word document?
    10·2 answers
  • In balloon framing, the second floor joist sits on a horizontal framing member called a _____.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!