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
Musya8 [376]
3 years ago
7

Python Lists and Events: Write a program that generates 8 random scores (between 0 and 100), store them in an array, finds the b

est score, and then assigns grades based on the following scheme (use loops wherever possible): Grade is A if score >= best – 10 Grade is B if score >= best – 20 Grade is C if score >= best – 30 Grade is D if score >= best – 40 Grade is F otherwise.
Computers and Technology
1 answer:
ollegr [7]3 years ago
3 0

Answer:

import random

scores = []

for i in range(8):

   score = random.randint(0,100)

   scores.append(score)

best_score = max(scores)

letter_grade = ""

for s in scores:

   if s >= best_score - 10:

       letter_grade = "A"

   elif s >= best_score - 20:

       letter_grade = "B"

   elif s >= best_score - 30:

       letter_grade = "C"

   elif s >= best_score - 40:

       letter_grade = "D"

   else:

       letter_grade = "F"

   

   print(letter_grade)

Explanation:

Import the random module

Create an empty list to hold the scores

Create a for loop that iterates 8 times. Inside the loop, create 8 random scores and put them in the scores

When the loop is done, find the best_score using max method

Create another for loop that iterates through the scores. Check each score and set the letter_grade depending on the given conditions.

You might be interested in
if i were to buy one of these and plug it into a ps4 usb slot would i be able to see it on a tv? cause my hdmi slot on the ps4 i
alisha [4.7K]
It should work unless you did or bought the wrong thing
7 0
3 years ago
Read 2 more answers
In the context of firewall as a nonbiometric security measure, a _____ is software that acts as an intermediary between two syst
irga5000 [103]

Answer:

Proxy Server                        

Explanation:

  • Proxy server is a server that acts as a mediator between two systems.
  • One system can be your computer and the other can be the server to which you are asking a service, such as requesting a web page.
  • Lets suppose you request a web page from a server and you type a URL of a website to access a web page.
  • This request goes to proxy server which sends this request on your behalf to the target server in order to retrieve that web page.
  • Proxy server makes this request to the target server on the internet by using one of its IP addresses.
  • When the proxy server gets that web page, it will forward that web page to your requesting computer.
  • If you request a specific service such as a website frequently the proxy server saves that website on its cache.
  • So if you request that website again, proxy server will forward it to you from its cache rather than requesting it again from the target server on your behalf resulting in quick response to the user's request.
  • Proxy servers provide users with privacy to access the websites, and they can surf the internet anonymously .
8 0
3 years ago
By default, headers and footers apply to
AleksAgata [21]
Hold up I know he answer
6 0
3 years ago
Put the following steps of the problem solving process in correct order.
Goryan [66]
It is already in a correct order
3 0
3 years ago
Select the statements that are true regarding the future of technology. Select 2 options.
nata0808 [166]

Answer:

  • Quantum computers are currently being built by Google and IBM, and will be available to the public in 2021.
  • Biocomputing can involve the use of biological components, like DNA, to store and process data.

Explanation:

Quantum computers make use of quantum processes like superposition to perform computation which make them exponentially faster and more powerful than normal classic computers.

Leading the way to develop quantum computers that will be available to the public are Google and IBM with IBM having confirmed in September 2020 that they already have a 65 qubits quantum computer which should be public by 2021.

Biocomputing is also another exciting future prospect in computer technology. It involves the use of biological components like DNA and proteins to store and process data. It is believed that with further work in this field, biocomputers will be able to perform computations many times faster than the traditional computer.

4 0
4 years ago
Other questions:
  • An example of an unaltered material used to create objects is
    14·1 answer
  • Each processor or core processes two threads at the same time is called _________.
    5·1 answer
  • Does anyone know the answer to 2 and 3
    6·1 answer
  • Programmers use a(n) ____ when they need the computer to repeatedly process one or more program instructions until some conditio
    13·1 answer
  • Joshua needs to join in two cells together which of the following would perform the function
    14·1 answer
  • What is an application letter?
    10·1 answer
  • Rick works for the government and is investigating a small business that the government suspects has been cheating on its taxes.
    15·1 answer
  • What does px mean in css ?
    13·1 answer
  • How many pieces are there in a normal laptop??? Good luck and solve carefully
    9·1 answer
  • 3. Fire and police protection is the main responsibility of
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!