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
Olegator [25]
3 years ago
8

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

Computers and Technology
1 answer:
maksim [4K]3 years ago
6 0

Answer:

<em>The program written in python is as follows;</em>

<em>Note that the program makes use of function named checkbest</em>

<em>Lines written bold are comments and are used to replace the explanation section</em>

<em></em>

#Program starts here

#This line imports the random module into the program

import random

#This line defines the function checkbest, with 2 parameters

def checkbest(score,best):

     #The following if condition implements the condition as stated in the

     #program requirement

     if score >= best- 10:

           grade = "A"

     elif score >= best - 20:

           grade = "B"

     elif score>= best - 30:

           grade = "C"

     elif score >= best - 40:

           grade = "D"

     else:

           grade = "F"

     #This line returns the letter grade depending on the above

     #conditions

     return "Grade: "+grade

#The main method starts here

#This line declares an empty list

array = []

#This line iterates from 1 to 8

for i in range(1,9):

     #This line generates a random integer between 0 and 100 (inclusive)

     score = random.randint(0,100)

     #This line inserts the generated score in the list

     array.append(score)

#This line sorts the list in ascending order

array.sort()

#This line gets the best score

best = array[7]

#This line iterates through the elements of the list

for i in range(0,8):

     #This line prints the current score

     print("Score: "+str(array[i]))

     #This line calls the function to print the corresponding letter grade

     print(checkbest(array[i], best))

     #This line prints an empty line

     print(" ")

#The program ends here

You might be interested in
When making any change to the database structure, we may need to check for effects of the change on ________.?
IrinaVladis [17]
Data, foreign keys, constraints & triggers .
7 0
4 years ago
The first computer (the eniac was how big
sattari [20]
The first computer is the Eniac which was 50 tons!
3 0
3 years ago
1. A formula =A1+B2 is in cell D8. If you copy that formula to cell D9, what is the new formula in cell D9?
MaRussiya [10]
1. Answer is B   (D9=<span>A2+B3)
2. </span><span>C. identifies how many cells with data were in the range 
3. </span><span>A. ascending (smallest to largest)
</span><span>4. A. the current worksheet </span>
6 0
3 years ago
After data is collected, how is it analyzed?
professor190 [17]

Answer:

It’s input into a computer and saved for future use

Explanation:

Step 1: Identify issues and/or opportunities for collecting data

The first step is to identify issues and/or opportunities for collecting data and to decide what next steps to take. To do this, it may be helpful to conduct an internal and external assessment to understand what is happening inside and outside of your organization.

-----------------------------------------------------------------------------------------------------------------

Step 2: Select issues and/or opportunities and set goals

The focus of Step 2 is choosing a priority issues and/or opportunities for collecting data, and then setting goals and objectives.

The organization reviews the issues and/or opportunities identified from the internal and external assessment done in Step 1, and picks one or more specific issues and/or opportunities for starting a data collection project from among the list of priorities. Some of the questions an organization can consider when deciding to prioritize an issue and/or opportunity for gathering data

-----------------------------------------------------------------------------------------------------------------

Step 3: Plan an approach and methods

In Step 3, organizations will make decisions about who will be surveyed, how data will be collected, the sources of data that will be used, and the duration of the data collection project, among other questions. These decisions may be made in consultation with an expert. The methods and approaches will flow from the goals set in Step 2, and will vary significantly depending on a number of factors, including the organization’s context, size, resources, and the purpose and complexity of the issue(s) or opportunity(ies) selected.

-----------------------------------------------------------------------------------------------------------------

Step 4: Collect data

When planning on how best to collect data in Step 4, it is important to be aware of the practical considerations and best practices for addressing logistical challenges organizations often face at this stage of the process. Implementing a data collection plan requires attention to matters such as:

  • Getting buy-in from senior leadership and key stakeholders, in or outside of the organization. This group could include boards of directors, management committees, union representatives, employees, community groups, tenants, customers and service users.
  • Establishing a steering committee or selecting a person(s) to be consulted and held accountable for all major decisions about the data collection process, such as design, logistics, communication management, coordination and finances.
  • Determining who will collect the data (e.g., experts or trained employees).
  • Identifying the logistics, resources, technology and people needed to develop and implement a data collection initiative.
  • Anticipating and addressing key stakeholder concerns and questions about the project.
  • Designing a communication and consultation strategy that will explain the data collection initiative and encourage the highest possible participation rate.
  • Protecting privacy and personal information by using carefully controlled procedures for collecting, storing and accessing data that comply with privacy, human rights and other legislation. Dignity and confidentiality must be respected.
  • Minimizing the impact and inconvenience for the people affected in the workplace or service environment, which includes choosing the best time to collect the data.
  • Aiming for flexibility to allow for changes without great expense or inconvenience.
  • Considering a test period or a pilot phase to allow you to improve and modify data collection methods, as may be needed.

-----------------------------------------------------------------------------------------------------------------

Step 5: Analyze and interpret data

Step 5 involves analyzing and interpreting the data collected. Whether quantitative and/or qualitative methods of gathering data are used, the analysis can be complex, or less so, depending on the methods used and the amount of data collected.

-----------------------------------------------------------------------------------------------------------------

Explaining the technical steps involved in analyzing and interpreting data is beyond the scope of this guide. An organization will have to determine whether it has the internal capacity and expertise to analyze and interpret data itself, or whether it will need the help of an external consultant.

-----------------------------------------------------------------------------------------------------------------

Step 6: Act on results

Once an organization has analyzed and interpreted the results of the data collected, it may decide to act on the data, collect more of the same type of data or modify its approach.

8 0
3 years ago
Marsha is working on a group project and needs to start putting together a slide presentation for the group. Two of her group me
Zigmanuir [339]

Answer:

Apple iWork.

Explanation:

Apple iWork would not work for whole group.

6 0
4 years ago
Other questions:
  • By default, windows active directory creates __________ user accounts when a new domain is created
    8·1 answer
  • Recall that TCP can be enhanced with SSL to provide process-to-process security services, including encryption. Does SSL operate
    7·1 answer
  • What are the disadvantages of plasma display?
    9·1 answer
  • Using data from the BITS database, define a view named TopLevelClient. It consists of the number, name, address, balance, and cr
    9·1 answer
  • Business customers pay $0.006 per gallon for the first 8000 gallons. If the usage is more than 8000 gallons, the rate will be $0
    11·1 answer
  • What is the value of the variable named result after the following code executes? var X = 5; var Y = 3; var Z = 2; var result =
    14·1 answer
  • How do the companies gather data to determine common passwords?
    13·1 answer
  • A tornado destroyed many
    6·2 answers
  • PLEASE HELP ME ASAP I HAVE AN EXAM SOON!!!!
    5·1 answer
  • What is the final amount stored in value if the computer selects 17 as the
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!