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]
3 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]3 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
Windows, Apple’s Mac OS, and Unix/Linux are just some of the most common what?
34kurt
Most common PC operating systems
7 0
3 years ago
Read 2 more answers
Online Book Merchants offers premium customers 1 free book with every purchase of 5 or more books and offers 2 free books with e
docker41 [41]

Answer:

8/9

Explanation:

i remember this question on my daughters book

8 0
3 years ago
23+ Composition refers to
Law Incorporation [45]

Answer:

c. The placement and relationship of  elements within a picture

Explanation:

Required

What composition means?

Literally, composition means the way the elements of a picture are presented. The elements in this case constitute all lines, shapes, dots, pattern and many more.

You will notice that some of these elements will be placed over one another, some side by side, some far from one another.

So, composition means the way these elements are displayed.

<em>Hence, option (c) is correct.</em>

3 0
2 years ago
advance in technology have enabled more and more people to purchase computers that would have once been too expensive. which of
Akimi4 [234]
I believe it is Netbooks
3 0
3 years ago
PLEASE HELP ASAP!!!!!!!!!! WILL GIVE A BRAINLIEST!!!!!!
sattari [20]
The answer to this question is:

"Both work with computers, but only Bluetooth can be used in a headset"

The answer to this is true because Both computers can use/work with computer but Bluetooth can only connect to head set headset don't need wifi it needs Bluetooth and charging/plug

Your Welcome :)
5 0
2 years ago
Read 2 more answers
Other questions:
  • What element of a timeline helps to mark progress of the project?
    15·1 answer
  • The while loop has two important parts: a condition that is tested and a statement or block of statements that is repeated as lo
    8·1 answer
  • Quick SearchLinks to an external site. lets you refine or narrow your search results using links on the right side of the screen
    5·1 answer
  • Write a program that has the following String variables: firstName, middleName, and lastName. Initialize these with your first,
    7·1 answer
  • Drag each label to the correct image.
    9·2 answers
  • Complete the sentence.
    14·1 answer
  • Visual culture is an area of academic study that deals with the totality of images and visual objects produced in ____________,
    6·1 answer
  • Consider the following method, which is intended to return the index of the first negative integer in a given array of integers.
    14·1 answer
  • Write an algorithm to find the average of three numbers: 10, 20, 30
    7·1 answer
  • Paisa pay is facilitated in which e commerce website​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!