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]
2 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]2 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
What occurs when information is copied from an internet source to another computer?
Margarita [4]
The answer is pasting
3 0
3 years ago
What do you think about Naruto?
Natalka [10]

Answer:

AMAZINGGG

Explanation:

because it just is !!

3 0
2 years ago
Read 2 more answers
Read the following code:
Nataliya [291]

Answer:

The answer is "A) Age in 20 years"

Explanation:

Assuming currentAge is declared and is an integer, you are adding 20 to your current age which means it will print your age in 20 years.

3 0
3 years ago
Read 2 more answers
What countries use this app besides the U.S.?
Naddik [55]
35 countries! Hope this hleps
3 0
2 years ago
Read 2 more answers
Write an application for Cody’s Car Care Shop that shows a user a list of available services: oil change, tire rotation, battery
Firdavs [7]

An application for Cody’s Car Care:

#include <iostream>

#include <string>

#include <vector>

using namespace std;

int main()

{

vector<string>stroptions(4);

stroptions[0] = "Oil Change";

stroptions[1] = "Tire Rotation";

stroptions[2] = "Battery Check";

stroptions[3] = "Brake Inspection";

 

vector<int> intprices(4);

intprices[0] = 45;

intprices[1] = 22;

intprices[2] = 15;

intprices[3] = 10;

 

int option;

cout<< "Welcome to Joe's Car Care Shop!" <<endl;

cout<< "Choose a service from our menu:" <<endl;

for(int i = 1; i<= 4; i++)

{

  cout<< "#" <<i<< ": " <<stroptions[i-1] <<endl;

}

cout<< "Choice: ";

bool loop = true;

while(loop)

{

  loop = false;

  cin>> option;

 switch(option)

  {

   case 1:

     cout<< "\nA " <<stroptions[option-1] << " will be: $" <<intprices[option -1] <<endl;

     break;

   case 2:  

     cout<< "\nA " <<stroptions[option -1] << " will be: $" <<intprices[option -1] <<endl;

     break;

   case 3:

     cout<< "\nA " <<stroptions[option -1] << " will be: $" <<intprices[option -1] <<endl;

     break;

   case 4:

     cout<< "\nA " <<stroptions[option -1] <<" will be: $" << intprices[option -1] <<endl;

      break;

    default:

     cout<< "\nYou entered an invalid item! Try again!" <<endl;

     loop = true;

     break;

 }

}

}

3 0
2 years ago
Other questions:
  • _____ provide the standards, syntax, statements, and instructions for writing computer software
    14·1 answer
  • The automotive system that connects the engine and the transmission to the wheels is called the
    14·1 answer
  • NEED HELP PLEASEE!!!
    9·1 answer
  • Which type of drawer has three dispensing modes: single-dose, multi-dose, and matrix?
    13·1 answer
  • During which geologic era was nearly all of Earth's land concentrated into one giant mass called Pangaea?
    6·1 answer
  • HI How are you anyways are any of you intreseted in my giveaway
    7·2 answers
  • How do I contact an admin
    8·1 answer
  • Write a program that asks the user to enter a positive integer that represents a number in the decimal system and then displays
    12·1 answer
  • Some of the latest smartphones claim that a user can work with two apps simultaneously. This would be an example of a unit that
    5·1 answer
  • You have installed Windows Server 2016 on a new server and want to centralize user logons and security policies. What type of so
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!