Python: Write a program that generates 8 random scores (between 0 and 100), store them in an array,
finds the best 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.

Answers

Answer 1

Answer:

The program written in python is as follows;

Note that the program makes use of function named checkbest

Lines written bold are comments and are used to replace the explanation section

#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


Related Questions

Finish the statement below to correctly describe the Defense Enrollment Eligibility Reporting System (DEERS). DEERS is a centralized Department of Defense database that _______________________________.

Answers

Answer:  A- the antlers and horns are structural adaptations. The fighting is a behavioral adaptation.

Antlers and horns are physical adaptations that some mammals have acquired over time. However, fighting is not a physical feature but a behavioral adaptation used to beat other males during mating season.

Explanation:

Whoever answers FRIST and it has to be correct so if you don’t know don’t waste your time pls. Anyway whoever answer frist I will give you brainliest and some of my points Which type of photography would you use if you wanted to photograph a fly?

Answers

Answer:

I think Ariel photography

Explanation:

I’m not sure, but I think so

Which object is a storage container that contains data in rows and columns and is the primary element of Access databases? procedures queries forms tables

Answers

Answer:

tables

Explanation:

For accessing the database there are four objects namely tables, queries, forms, and reports.

As the name suggests, the table is treated as an object in which the data is stored in a row and column format plus is the main element for accessing the database

Therefore in the given case, the last option is correct

Answer:

D. tables

Explanation:

took the test, theyre right too

Create Python program code that will use a for loop to ask the user to enterfourintegers. Itwillcount how many of the integers are divisible by 2. The programwill print each of the 4integers and a message saying whether the integeris even or odd. The code will print the total number of even integers

Answers

Answer:

is_even = 0

int_numbers = []

for n in range(4):

n = int(input('press any four integer numbers')

int_numbers.append(n)

for n in int_numbers:

if n%2==0:

print(n, 'integer is even')

is_even+= 1

else:

print(n, 'integer is odd')

print('Total even numbers =', is_even)

Explanation:

is_even = 0 (initiates a counter to record the number of even integers).

int_numbers creates a list to store the inputs entered by the user.

int(input()) : allows users to enter an integer number

int_numbers.append(n) : adds user input to list list variable created.

n%==2 : checks if entered digit leaves a remainder of 0 when divided by 2; hence an even number

is_even+= 1: counter updates by 1 for every even number confirmed.

What is one reason why a business may want to move entirely online?
A. To limit the number of items in its inventory
OB. To double the number of employees
C. To focus on a global market
D. To avoid paying state and local taxes​

Answers

Answer:

The correct answer is C. One reason why a business may want to move entirely online is to focus on a global market.

Explanation:

The fact that a business wishes to move entirely towards the online sales modality implies that there is a desire to expand the possibilities of selling its products beyond the physical place where it has its store.

It is a reality that starting an online business implies that the offered product can be purchased anywhere in the world, thanks to advances in technology and transportation that allow the product to be purchased and delivered in a matter of days, thanks to the advances produced by globalization.

Therefore, the fact that the store goes from physically to online selling makes its potential customers go from being the ones who know the store and live close to it to everyone in the world with access to internet.

To build a user interface that contains graphical components, the components ____. must each be added to a separate panel. must be added directly to a frame component. must be added to a panel that is contained within a frame. must be added to a frame that is contained within a panel.

Answers

Answer:

To build a user interface that contains graphical components, the components must be added to a panel that is contained within a frame.

Explanation:

Jasmine is using the software development life cycle to create a song-writing app. She wants to work with others to create music. What should Jasmine do to begin the process?
Analyze and document the requirements for building the app
Break up the work into chunks and begin writing the app code
Make improvements and enhancements to the app based on feedback Write pseudocode and create a mock-up of how the app will work and look

Answers

Answer:Python's built-in library of functions allows programmers to import pre-written applications.

Explanation:

Answer: Analyze and document the requirements for building the app

Explanation: I took a quiz with that question and guessed and got it right. Other than that, I got nothing

A data set includes data from 500 random tornadoes. The display from technology available below results from using the tornado lengths​ (miles) to test the claim that the mean tornado length is greater than 2.2 miles. Use a 0.05 significance level. Identify the null and alternative​ hypothesis, test​ statistic, P-value, and state the final conclusion that addresses the original claim. LOADING... Click the icon to view the display from technology. What are the null and alternative​ hypotheses

Answers

Answer:

The answer is:

[tex]H_0:\mu=2.2\\H_1:\mu> 2.2[/tex]

Explanation:

[tex]H_0:\mu=2.2\\H_1:\mu> 2.2[/tex]

The test value of statistic t= [tex]\frac{\bar x-\mu}{\frac{s}{\sqrt{n}}}[/tex]

                                               [tex]=\frac{2.31688-2.2}{0.206915}\\\\=0.56[/tex]

The value of P = P(T>0.56)

                          =1-P(T<0.56)

                          =1-0.712

                          =0.288

Since the P value exceeds its mean value (0.288>0.05), the null assumption must not be rejected.  Don't ignore H0. This assertion, it mean length of the tornado is greater than 2.2 miles also isn't backed by enough evidence.

how to use command prompt​

Answers

Answer:

The answer to this question can be defined as follows:

Explanation:

The Command Prompt is a program, which available in windows operating systems, which imitates an input field with windows GUI(Graphic User Interface). It provides a text-based user interface, that can be used to run instructions inserted and carry out advanced organizational activities, following are the step to open a command prompt:

There are two-step to open the command prompt in windows:  

First, go to the start button the window. after open start type cmd on the search bar, It will provide the cmd to open it click with mouse or press enter button.    With the help of keyboard press (window+R) key together, after pressing it will provide the run prompt in which we write cmd and press enter. It will open a command prompt panel.    

Usually when i am using my windows 10 laptop and using the internet, it stops working and says "No Internet." So i disconnect from the wifi i was using, and then i reconnect to it and it works fine. But it keeps on doing the same thing and it is really annoying. please help!

Answers

Answer:

I used to have the same proble, have you tried rebooting it? That normally works. If not, you have to change your internet plan completely. That’s what I had to do. But first try rebooting.

Explanation:

Robyn is using lookup functions in her Excel 2016 worksheet. Which formula uses the correct syntax? =VLOOKUP(lookup_value, table_array, col_index_num, range_lookup) =VLOOKUP(table_array, lookup_value, col_index_num, range_lookup) =VLOOKUP(lookup_value, table_array, col_index_num, value) =VLOOKUP(table_array, lookup_value, col_index_num, value)

Answers

Answer:

Explanation:

Hello,

the logic is a below

=VLOOKUP(

lookup_value what you want to look up,

table_array where you want to look for it,

col_index_num the column index in the range containing the value to return,

range_lookup

is a TRUE or FALSE value. return an Approximate or Exact match

)

hope this helps

Answer:

in more simple words to us Edge users

Answer Shown by the guy below us is A

well it seems to be

Explanation:

Edge2020

What form of note taking would be MOST beneficial for a visual learner who needs to see the connections between ideas?


Think link


Formal outline


Time lines


Guided notes

Answers

Answer:

Think link

Explanation:

Roger is getting a $5,000 loan. Which option will allow Roger to pay off the loan and keep his payments under $100?

Answers

No roger will not be able to do that

Which of the following statements about an inner class is true? An inner class is used for a utility class that should be visible elsewhere in the program. An inner class that is defined inside a method is publicly accessible. An inner class that is defined inside a method is not publicly accessible. An inner class that is defined inside an enclosing class but outside of its methods is not available to all methods of the enclosing class.

Answers

Answer:

(c) An inner class that is defined inside a method is not publicly accessible.

Explanation:

In programming languages such as Java, inner class (also called nested class) basically means a class inside another class or interface. The following are a few things to note about an inner class

i. Inner classes are used to group classes logically so that they are easy to use and maintained.

ii. An inner class defined inside a method of an enclosing class is not publicly accessible. They are called method local inner class

iii. An inner class that is defined inside an enclosing class but outside of its methods are available to all methods of the enclosing class

iv. An inner class has access to members, including private members, of its enclosing class.

The acronym "HTTP' stands for​

Answers

Answer:hypertext transfer protocol secure

Explanation:

Explanation:

http means hypertext transfer protocol secure

IANA has primarily been responsible with assigning address blocks to five regional internet registries (RIR). A tech needs to research address blocks assigned in the United States. Which RIR should the tech contact?

Answers

Answer:

The American Registry for Internet Numbers ARIN

Explanation:

The American Registry for Internet Numbers (ARIN) is a not for profit organization that serves as the administrator and distributor of Internet numeric resources such as IP addresses (IPv4 and IPv6) ASN for the United States, Canada, as well as North Atlantic and Caribbean islands

There are four other Regional Internet Registry including APNIC, RIPE NCC, LACNIC and AFRINIC.

Name all of the gates used in programming.

Answers

Answer:

BUFFER GATE, NOT GATE, OR GATE, AND GATE, NOR GATE, NAND GATE, XOR GATE and , XNOR

Which of the following answers refers to a system containing mappings of domain names to various types of data, such as numerical IP addresses?

Answers

Answer:

DNS or Domain Name System

Explanation:

You can query a DNS server with a domain name to get an IP address.

Which statement is the best description of what a macro can do in Excel 2016? It is a type of formatting users can apply to enlarge the worksheet area. It is a file type that a user can save a workbook as. It is a series of instructions contained in one command that users can apply to automate complex and/or repetitive tasks. It is a recording function that allows you to save worksheets, audio recordings, and videos that are displayed on the screen.

Answers

Answer: It is a series of instructions contained in one command that users can apply to automate complex and/or repetitive tasks

One example would be a macro that goes through a list of numbers and highlights which are duplicates. Say you had the list {1,2,3,3,4,4,4,5}. You could use one color to highlight both 3 and 4 as they repeat themselves. Or you could use different colors to show the different values. With a small list, you could highlight by hand. However, macros are more efficient with larger lists.

Answer:

It is a series of instructions contained in one command that users can execute to automate complex and/or repetitive tasks.

Explanation:

edge 2022

Which is the right way to give comment if you are using Internet explorer as the browser? a) <!-- My First Webpage --> b) <comment> My First Webpage </comment>

Answers

Answer:

(a) <!-- My First Webpage -->

Explanation:

Comments in programming languages are chunks of texts, written as part of program code, that are not executed as actual code but rather used for making the program code easily readable and understandable. They allow programmers to explain certain lines of a program code.

Every programming language has its own way of representing comments. In HTML - HyperText Markup Language - comments are written between the following tags :

<!--

and

-->

For example, to put the text "My comment goes here" in a comment, we write:

<!-- My comment goes here -->

From the question, the text to be put is:  "My First Webpage". Therefore, we write;

<!-- My First Webpage -->

Python Lists and Events: Write a program that generates 8 random scores (between 0 and 100), store them in an array, finds the best 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.

Answers

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.

convert the following decimal number to its equivalent binary ,octal,hexadecimal 1920​
pls in step by step
pls help me bro

Answers

Answer:

0b11110000000 is binary

0o3600 is in octal

0x780 in hexa dec.

Explanation:its a bit complitcated to explain sorry bro!

You work for a public relations (PR) firm and communicate regularly with the internal team and the clients on a PR campaign. You need to quickly send and receive professional messages that may contain text files and short media. These messages need to be accessible at any time of the day and in different time zones, and they should be able to reach all members (internal and external) relatively inexpensively. Which communication channel would best suit this purpose?

Answers

Answer:

You Need To Quickly Send And Receive Professional Messages That May Contain Text Files And Short Media. These Messages Need To Be Accessible At Any Time Of The Day And In Different ... You work for a public relations (PR) firm and communicate regularly with the internal team and the clients on a PR campaign.

Explanation:

Email would likely be the best communication channel to meet these requirements. Once an email is sent, it broadcasts across servers and arrives at the recipient’s/recipients’ mailbox(es) for access at the receiving party’s/(ies’) convenience. Email is also able to have attachments, and as such, will allow for text files and smaller media files (audio, video, or otherwise) to be attached and accessed easily.

What is Relational Computerized Database

Answers

Answer:

Relational computerized database uses tables and columns to store data. each table is composed of records and each record is tied to an attribute containing a unique value. This helps the user use the data base by search query and gives the opportunity to build large and complex data bases

what are reserved words in C programming?

Answers

Answer:

A word that cannot be used as an identifier, such as the name of a variable, function, or label. A reserved word may have no meaning. A reserved word is also known as a reserved identifier.

Explanation:

quick google search

convert thefollowing decimal number to its equivalent binary, octal, hexadecimal 255

Answers

Answer:

Binary: 11111111

Octal: 377

Hexadecimal: FF

Explanation:

Given

Decimal Number: 255

Required

Convert to

- Binary

- Octal

- Hexadecimal

Converting to binary...

To convert to binary, we take note of the remainder when the quotient is divided by 2 until the quotient becomes 0;

255/2 = 127 R 1

127/2 = 63 R 1

63/2 = 31 R 1

31/2 = 15 R 1

15/2 = 7 R 1

7/2 = 3 R 1

3/2 = 1 R 1

1/2 = 0 R 1

By writing the remainder from bottom to top, the binary equivalent is 11111111

Converting to octal...

To convert to octal, we take note of the remainder when the quotient is divided by 8 until the quotient becomes 0;

255/8 = 31 R 7

31/8 = 3 R 7

3/8 = 0 R 3

By writing the remainder from bottom to top, the octal equivalent is 377

Converting to hexadecimal...

To convert to hexadecimal, we take note of the remainder when the quotient is divided by 16 until the quotient becomes 0;

255/16 = 15 R 15

15/16 = 0 R 15

In hexadecimal, 15 is represented by F; So, the above division can be rewritten as

255/16 = 15 R F

15/16 = 0 R F

By writing the remainder from bottom to top, the hexadecimal equivalent is FF

Could someone give an example or tell me what all of these mean? (For internet source citing) Evaluation: • Domain Name: • Authoritativeness: • Accuracy: • Timeliness: • Objectivity: •Writing Style and Mechanics: • Graphics: • Links:

Answers

Evaluation-the making of a judgment about the amount, number, or value of something; assessment

Domain Name-Is a websites name (ex-Google)

Authoritativeness-The quality of possessing authority. The quality of trustworthiness and reliability.

Accuracy-the quality or state of being correct or precise

Timeliness-the fact or quality of being done or occurring at a favorable or useful time.

Objectivity-the quality of being objective.

Writing Style and Mechanics-Style has to do with how a piece of writing sounds. Everyone has a style which develops along with their writing.

Paragraph structure: Each paragraph should begin with a topic sentence that provides an overall understanding of the paragraph. ...

Sentence length: Sentences should be kept as short as possible so that their structure is simple and readable.

Graphics-are visual images or designs

Links- is an open source text and graphic web browser with a pull-down menu system.

HELP I WILL MARK BRAINLIEST!!! I NEED ASAP!!!
Python: With a program to store the list of all your friends, then sort the list and print them in alphabetical order. The program should create a loop to accept the names of all your friends. Exit the loop when the user has no more items to input. Then sort the list alphabetically and print out the new list. (Side Note: Make Sure Your Code Works Before Submitting) Note: You cannot predefine the list of friends. The list should be initialized to an empty list

Answers

#This is a way without a loop

friends = list(map(str,input("Enter Names: ").split()))

print(sorted(friends))

#This is a way with a loop (for&&while)

friends = list(map(str,input("Enter Names: ").split()))

cool = True

while cool:

   cool = False

   for i in range(len(friends)-1):

       if friends[i] > friends[i+1]:

           coo = friends[i]

           friends[i] = friends[i+1]

           friends[i+1] = coo

           cool = True

print(friends)

Carlos, an algebra teacher, is creating a series of PowerPoint presentations to use during class lectures. After writing, formatting, and stylizing the first presentation, he would like to begin writing the next presentation. He plans to insert all-new content, but he wants to have the same formatting and style as in the first one. What would be the most efficient way for Carlos to begin creating the new presentation?

Answers

Answer:

see explanation

Explanation:

Carlos can make a copy of the old presentation that preserves all the formatting, and replace old content with new information.

Answer:

going under the Design tab and opening the template that was created for the first presentation

Explanation:

What is the best application to create a slide show presentation?

Answers

Answer:

Microsoft Windows File Manager

PowerPoint but for your question chrome seems to be the right answer cause other ones don’t make sense but like also isn’t PowerPoint part of windows so it might be that
Other Questions
12 a rational number or an integer? Write a brief note on MALARIA.!! i mark brainliest for all my questions that are answered right :) thx for helping me What does an organism's genotype describe? Eric works for salary of $3,500 per month. He has federal income withheld at the rate of 15%, Social Security tax at the rate of 6.2%, Medicare tax at the rate of 1.45% and health insurance premiums of $48 per month. Erik also contributes to a savings plan. Each month, 2% of his gross pay is placed in the savings plan. After Erik pays the taxes on his money what is Eric's net pay? A. (1,448.45) B. (1,799.05) C. (2,589.25) D. (2799.05) _______on the blood determine a persons blood type. _______in the blood attack foreign blood not compatible with the antigens on the blood. translate the sum of x and one half of x into a mathematical expression Fill in the missing amounts. Identify each of the following half-reactions as either an oxidation half-reaction or a reduction half-reaction.H2(g) 2H+(aq) + 2e- oxidation Cu2+(aq) + 2e-Cu(s) reduction Write a balanced equation for the overall redox reaction. Use smallest possible integer coefficients. HELP ME PLEASE PLEASE IM BEGGING Which is a perfect square?61626365 Use the following table for the problem below. 1 Ping-Pong Balls 1 HatLarry 1/5 of a hat 5 ping-pong ballsCurly 1/2 of a hat 2 ping-pong ballsAccording to the opportunity cost table above, which trading proposal will Curly gain and Larry lose?A. Larry offers Curly 1 ping-pong ball for 1/4 of a hat.B. Curly offers Larry 1 hat for 3 ping-pong balls.C. Curly offers Larry 1 hat for 4 ping-pong balls.D. Larry offers Curly 1 ping-pong ball for 1/3 hat. Combine the like terms to create an equivalent expression: -n+(-3)+3n+5 4The equation of a circle is x2 + y2 + x + Dy+ E= 0. If the radius of the circle is decreased without changing the coordinates of the center point, how are the coefficients CD,and E affected?O A CD, and E are unchanged. If the gradient is negative or positive how will it be Please i need it now! Thanks 1. 21 + x = 262. 12 + 2x = 163. 4x - 2 = 104. x + 7 = 12algebra I hat it please help me Triangle ABC is drawn inside regular hexagon ABCDEF. What is the ratio of the area of triangle ABC to the area of the hexagon? Eggs and sperm are examples of _____. zygotes somatic cells diploid cells gametes The additive inverse of x/y is Match each power of a power expression with its simplified expression.