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
​a(n) ____ is a communications device that connects a communications channel such as the internet to a device such as a computer
marissa [1.9K]
Router? Modem? I have no ideas outside of those.
8 0
3 years ago
What is word processing?
butalik [34]
A. Citing sources for documents you found on the web
3 0
3 years ago
Read 2 more answers
Which set of symbols can be used to determine which calculations to perform first?
Monica [59]

Answer:

parentheses

Explanation: hope i helped <3 °ω°

5 0
3 years ago
Read 2 more answers
A diet to contain at least 2400 units of vitamins, 1800 units of minerals, and 1200 calories two foods , Food A and Food B are t
Firdavs [7]

Answer:

30 units of Food A and 45 units of Food B are to be purchased to keep costs at the minimum $105.

Explanation:

X = Amount of food A

Y = Amount of food B

Z= 2X+Y..... minimum cost equation

50X + 20Y > 2400 .................Vitamins .......(1)

30X + 20Y > 1800 ...................Minerals.......(2)

10X + 40Y > 1200 .................Calories ..........(3)

X  > 0

y  > 0

X=30  and Y = 45

Z= 2(30) + 45 = $105

8 0
3 years ago
Which supercontinent is thought to have formed about 1 billion years ago and to have included most of Earth's land masses?
riadik2000 [5.3K]
C (Pangaea)

Dinosaurs lived on Pangaea
7 0
3 years ago
Other questions:
  • For homework, we have to figure out what's in the picture. It's " too close to tell " but I can't figure out what it is. Any ide
    11·1 answer
  • A cpu handless all the instruction that it recieces from hard ware and software which are available on the computer true or fals
    7·1 answer
  • How many clients has<br> Accenture engaged globally on blockchain?
    12·1 answer
  • What is the role of the memory in a computer ​
    11·1 answer
  • A computer is performing a binary search on the sorted list of 7 numbers below. What is the maximum number of iterations needed
    15·1 answer
  • What is problem scoping
    14·1 answer
  • Which skill type refers to the ability to interact and communicate effectively with people? skills refer to the ability to inter
    8·2 answers
  • How do you fix this!!!!
    5·1 answer
  • The Ocean Medallion is a wearable device that connects virtually to various devices on board a cruise ship. When a guest is wear
    14·1 answer
  • What steps can you take to secure your private information?.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!