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
bezimeni [28]
4 years ago
6

Define a function below called process_grades. The function takes one argument: a list of integers. Each integer in the list cor

responds to a student's grade in a class. Complete the function such that it returns a new list where the integer grades are replaced by letter grades. For this question, use a standard grading scale without +/- grade, as follows A: 90-100 B: 80-89 C: 70-79 D: 60-69 F: < 60 For example, given the list [90, 85, 85, 72], the function should return ['A','B','B','C'].
Computers and Technology
1 answer:
stealth61 [152]4 years ago
8 0

Answer:

Following are the code in the Python Programming Language.

#define function

def process_grades(std_grades):

 result = []   #list type variable

 for grades in std_grades:   #set for loop

   if 90<=grades<=100:    #set if statement

     lettersGrade = 'A'   #variable initialization

   elif 80<=grades<=89:   #set elif statement

     lettersGrade = 'B'   #variable initialization

   elif 70<=grades<=79:   #set elif statement

     lettersGrade = 'C'    #variable initialization

   elif 60<=grades<=69:     #set elif statement

     lettersGrade = 'D'    #variable initialization

   else:    

     lettersGrade = 'F'    #variable initialization

   result.append(lettersGrade)     #append the value of lettersGrade in result

 return result      #print the value of the variable result

print(process_grades([90, 85, 85, 72]))   #call the function

Output:

['A', 'B', 'B', 'C']

Explanation:

Here, we define the function "process_grades" and pass an argument in the parameter list is "std_grades" in which we pass the grades of the students.

Then, we set the list data type variable "result" i9n which we store the grades of the students.

Then, we set the for loop and pass the condition.

Then, we set the "if-elif" statement and pass the conditions as given in the question.

Then, we append the value of the variable "lettersGrade" in the variable "result".

Finally, we call then function.

You might be interested in
What are the TV resolutions
Leokris [45]
Numbers like 1080p and 4K refer to a TV's<span> screen </span>resolution and<span> the more pixels a screen has the more picture detail it can show.</span>
6 0
3 years ago
If you answer I will mark brainliest!!! I want to be able to see two websites on my screen at the same time, how do I do that on
aleksandrvk [35]
Click chrome with 2 fingers on your mousepad and click new window, you can have 2 websites open at once this way
8 0
3 years ago
A seismograph has a heavy weight that is hung from a spring. What would happen if the weight were attached to a rod instead of a
Goshia [24]
<h2><u>Answer:</u></h2>

A seismograph has an overwhelming weight that is swung from a spring. As the spring is high touchy to the developments of the Earth at that point is the correct decision offer a seismograph.

On the off chance that this is changed by a pole, at that point it won't see the developments of the earth making the seismograph not precise and it would not work.

6 0
3 years ago
How can having good organization skills help you be a better students/employee?
abruzzese [7]

Answer:

Help you be a better student:

1. its easier to find things to help you study

2. it's easier to turn assignments in

help you be a better employee

1. organization skills can help you get a job

2. they can help you while your working the job

3. they can help others who are working the same job\ are trying to buy something from your job (some kind of store example: grocery store, clothing store, furniture store etc.)

8 0
3 years ago
Name all the keys of the home row.
Kaylis [27]

Answer:

Search key, a, s, d, f, g, h, j, k, l, : and ;, ¨ and ´, and the enter key.

5 0
3 years ago
Other questions:
  • References are usally innocuous because they are the least personal and direct of the four reference types
    5·1 answer
  • If you have related data stored in multiple tables, create a(n) ________ to produce a pivottable on the combined data.
    13·1 answer
  • List and briefly defined categories of security services.
    8·1 answer
  • If you wish to edit a data source in a document, you can make modifications when you select the data sources or _____.
    7·2 answers
  • You can view information for the individual people who will perform the tasks on theproject in the
    7·1 answer
  • In the world of computing, _________ means acquiring or exchanging copies of protected digital creations without payment or perm
    12·1 answer
  • Which software development team memeber is responsible for the timeline and budget
    9·1 answer
  • Assume that scotus is a two-dimensional character array that stores the family names (last names) of the nine justices on the Su
    14·1 answer
  • It is the "executable" phrase of Word<br>Wide Web with dynamic applications,?<br>​
    9·1 answer
  • Need answer quick plz.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!