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
gulaghasi [49]
3 years ago
10

) Define a function, when input is a list of scores, return its corresponding list of grades (You can use functions defined in t

he previous sub problems). i.e. the 1st grade (in the list of grade) is the grade of 1st score (in the list of score), the 2nd grade (in the list of grade) is the grade of 2nd score (in the list of scores)... For example, when input is [100, 20, 75, 81], your function should return a list of grade ["A", "F", "C", "B"]. (you can use any function you defined in previous sub problems)
Computers and Technology
1 answer:
slavikrds [6]3 years ago
6 0

Answer:

def letter_grade(grades):

   letters = []

   for grade in grades:

       if grade >= 90 and grade <= 100:

           grade = 'A'

       elif grade >=80 and grade <= 89:

           grade = 'B'

       elif grade >=70 and grade <= 79:

           grade = 'C'

       elif grade >=60 and grade <= 69:

           grade = 'D'

       else:

           grade = 'F'

       

       letters.append(grade)

   return letters

lst = [100, 20, 75, 81]

print(letter_grade(lst))

Explanation:

Create a function called letter_grade that takes one parameter, grades

Create an empty list, letters, to hold the letter grades

Initialize a for loop iterates through the grades. Check each grade, find its convenient letter and put it in the letters.

When the loop is done, return the letters.

Call the function with given list and print the result

You might be interested in
How to make a message appear in more than one slack channel
VMariaS [17]

Answer:

On your desktop, hover over the message you'd like to share and click the Share message icon on the right. Use the drop-down menu to choose where you'd like to share the message, and add a note if you'd like. Click Share to see the message expand.

Explanation:

7 0
3 years ago
Find the double word-length 2's complement representation of each of the following decimal numbers:a. 3874
miss Akunina [59]

Answer:

-3874₁₀ = 1111 1111 1111 1111 1111 1111 1101 1110₂

Explanation:

2's complement is a way for us to represent negative numbers in binary.

To get 2's complement:

1. Invert all the bits

2. Add 1 to the inverted bits

Summary: 2's complement = -N = ~N + 1

1. Inverting the number

3874₁₀ = 1111 0010 0010₂

~3874₁₀ = 0000 1101 1101₂

2. Add 1 to your inverted bits

~3874₁₀ + 1 = 0000 1101 1101₂ + 1

= 0000 1101 1110₂

You can pad the most signigicant bits with 1's if you're planning on using more bits.

so,

12 bits                          16 bits

0000 1101 1110₂  = 1111 0000 1101 1110₂

They asked for double word-length (a fancy term for 32-bits), so pad the left-most side with 1s' until you get a total of 32 bits.

           32 bits

= 1111 1111 1111 1111 1111 1111 1101 1110

7 0
3 years ago
A computer network is a collection of _____.
Talja [164]
Wifi..............????
6 0
3 years ago
Read 2 more answers
Suppose an array of country codes and country names is created with a statement like this: $country_codes = array('DEU' =&gt; 'G
valentina_108 [34]

Answer:

Following are the code in the PHP Programming Language:

<u>foreach ($country_codes as $code => $name) { </u>

Explanation:

The following option is true because the Foreach statement only works on the objects and array and this statement is good for accessing the key and value pairs from the array.

So, that's why to print following associative array through echo statement we use the Foreach loop statement with following right condition.

<u>syntax</u>:

foreach (array as value)

{

  code or body to execute;

}

8 0
3 years ago
Which managed service should you use if you want to do a lift and shift of an existing Hadoop cluster without having to rewrite
Viefleur [7K]

The managed service should you use if you want to do a lift and shift of an existing Hadoop cluster without having to rewrite your Spark code is f G. Cloud's.

<h3>What is Lift and shift Hadoop clusters?</h3>

This is one where a person can migrate their existing Hadoop and Spark deployment so that they can use G. Cloud without  having to engage in re-architecting.

The managed service should you use if you want to do a lift and shift of an existing Hadoop cluster without having to rewrite your Spark code is f G. Cloud's as it is advantage fast and flexible way to put together infrastructure as a service and others.

Learn more about  managed service from

brainly.com/question/20495853

#SPJ1

3 0
2 years ago
Other questions:
  • Cliff just started working with a client who has a very disorganized AdWords account. What’s an effective way for him to begin r
    15·1 answer
  • An algorithm is defined as a well-ordered collection of unambiguous and effectively computable operations that when executed pro
    10·1 answer
  • An application programming interface (API) is ________. Select one: A. the code to interface between an application and RAM B. t
    15·1 answer
  • A SOHO's connection to the internet is through an antenna that sends and receives a microwave signal to the ISP's antenna. There
    8·1 answer
  • Create an array named itemDescription containing the following item descriptions:
    15·1 answer
  • Write an application that determines which, if any, of the following files are stored in the folder where you have saved the exe
    10·1 answer
  • What does Al stand for?
    10·1 answer
  • My brainly isnt working it isnt showing and answers wats going on? wat do i do
    14·2 answers
  • Select the correct answer.<br> What do you understand by "exposition"?
    10·2 answers
  • El botón de layout se usa para <br>​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!