You have been asked to write a program for the Duckie's Obstacle Race. The program calculates the total number of racers, the fastest race time, the slowest race time, and the overall average race time.

Ask user to enter the maximum number of racers allowed for the race
Use repetition structure (loop) to ask the user to enter race times (in minutes)
Exit the loop if the user specifies there are no more times to enter (sentinel value) or if the maximum number of racers allowed has been reached
At a minimum, within the loop, you should keep track of how many race times are entered, the fastest race time and the slowest race time.
After the loop is exited, display how many race times were entered, the fastest race time, the slowest race time and the overall average race time.
Format your output appropriately
Be sure to include all appropriate documentation at the start of the program and within the program body

Answers

Answer 1

The program illustrates the use of loops and conditional statements

Conditional statements are used to make decisionsLoops are used for operations that must be repeated until a certain condition is met.

The race program

The program written in Python, where comments are used to explain each action is as follows:

#This initializes the variables to 0

totalRaceTime = 0; minRaceTime = 0; maxRaceTime = 0; countTimes = 0

#This gets input for the number of race times

numTimes = int(input("Number of times: "))

#This opens a sentinel controlled loop

while countTimes < numTimes:

   #This gets the race time

   raceTime = int(input("Race time: "))

   if countTimes == 0:

       minRaceTime = raceTime

       maxRaceTime = raceTime

   #This determines the highest race time

   if raceTime > maxRaceTime:

       maxRaceTime = raceTime

   #This determines the leest race time

   if raceTime < minRaceTime:

       minRaceTime = raceTime

   #This determines the total race time

   totalRaceTime+=raceTime

   countTimes+=1

#This prints the highest race time

print("Maximum: ",maxRaceTime)

#This prints the least race time

print("Minimum: ",minRaceTime)

#This prints the average race time

print("Average: ",round(totalRaceTime/numTimes,2))

Read more about while loops and conditional statements at:

https://brainly.com/question/24833629


Related Questions

Explain the relationship between one’s point of view and understanding spoken text

Answers

In spoken and audio texts the tone and accompanying sounds convey a point of view. Point of view therefore constructs an attitude towards the subject matter in a text which the reader, listener or viewer is invited to adopt.

Please have a wonderful day <3

[ASAP!] What is a widget?

1. a part of a GUI that allows a specific type of interaction with the user
2. an action taken by the user or a process, such as a user clicking a mouse or pressing a key on a keyboard
3. an algorithm for handling an error
4. a part of a program that responds to an event​

Answers

Answer:

A

Explanation:

A part of a GUI is the basic definition of a widget.

Comment any additional questions!

Answer:

A or number 1

Explanation:

I took the test and got a 100%, and this answer makes the most sense

You have a filtered dataset for Customer Sales with some null value rows. You want to remove these rows completely. How will you do this

Answers

The option is to Deselect (blank) in the pull-down menu for Customer Sales in the dataset.

How do one delete these rows completely?

If a person is working in the Query Editor (that is the place where one can get data, before you close and apply).

The right thing to do is to select the column that  you want to use to check for nulls and when  the values you are looking at is really blank, you can then click the drop-down and delete Rows in the ribbon, then one can click the option of Remove Blank Rows.

See full options below

Select an answer:

Deselect (null) in the pull-down menu for Customer Sales in the Power Query Editor.

Deselect (blank) in the pull-down menu for Customer Sales in the dataset.

Change the filter so null value rows are not displayed.

Place your cursor to the left of the rows, and then select Delete.

Learn more about dataset from

https://brainly.com/question/24309209

help meeeeeeeeeeeeeeeee

Answers

Answer:

The advantages include much access to photos, digital functions like games and contacts with friends, videos, and you can search questions to anything you like. Disadvantages include things like too much screen time affecting sleep, health, and other physical problems. There is also exposure to explicit content and hatred from strangers.

There are hundreds of editing software for you to try, and many are free to use and are even compatible offline. They can make content related to or look like something in a movie or can be used to make things look nicer and cooler.


________ can contain stacked images, text, and other elements which collectively comprise a Photoshop file.

Answers

If you don’t mind can u add the picture it helps me Answer the question better

Should new technology be created if there is a chance it will be misused?

Answers

Answer:

yes

Explanation:

sometime great things can happen out of terrible things.

Answer:

No, because if there is a chance that it will be misused, then it should not be created. Also, we are not told exactly how it may be misused - it could have catastrophic impacts, and cause harm.  

Explanation:

Which item is used in Excel to identify the row of a particular cell?
letter
number
type
sheet

The answer is B) number

Answers

Answer:

B) number

Explanation:

you are correct! for instance the cell E3 has the column E and the row 3

Woulf you rather :
Be a Alpha Wolf
or
Be a Alpha Shark

Answers

Answer:

Alpha wolf

Explanation:

Their superior

(also what is this question? lol)

Answer:

don't know just wanted my points you stole

Explanation:

The IT staff at a hospital shares genetic information about specific patients with a life insurance company. Which ethical standard was violated?

Answers

The ethical standard which was violated by the IT staff at a hospital is: confidentiality.

What is PHI?

PHI is an acronym for protected health information and it can be defined as any form of health information for a patient that mustn't be disclosed without the patient's knowledge, approval (consent) or used for the payment of health care insurance for employees.

This ultimately implies that, it is an ethical standard for all health workers to keep and protect protected health information under normal working conditions because they are confidential in nature with respect to Health Insurance Portability and Accountability Act (HIPAA).

Read more on PHI here: https://brainly.com/question/24439144

The quickest way to change a word is to double
click it.
Select the correct answer
O True
False

Answers

Answer:

I don't think that the fastest way to change a word is to double click it. Even though it highlights it super fast, then you just press backspace once, it doesn't compare to the one where you press the "ctrl" and "backspace" key at the same time, and it makes the whole entire word disappear in the blink of an eye. But, I am not sure if anybody really knows about this trick. So, it is 50/50.

Explanation:

:)

List and describe in detail any four power management tools that were developed by at
least two manufacturers to prevent and/or reduce the damage of processors from the
process of overclocking. Your answer must also include the manufacturers name

Answers

Power management tools is a kind of technology that enables the efficient and optimized management of the power that is consumed by computer hardware.

What is the purpose of a power management tool?

The key purpose of a power management tool is to help:

minimize power consumption;save costspreserve the optimal performance of the system.

Examples of power management tools are:

Signal chain PowerADI Power StudioLTpowerPlay, etc.

Learn more about Power management tools at:
https://brainly.com/question/12816781

explain the measures put in place in order to maintain each of the element of computer security

Answers

Answer:

Contains a firewall.

Try's to keep all software up to date.

Able to use antivirus software and keep it current.

Allows you to use a password

Explanation:

Computer security is important because it keeps your information protected. It's also important for your computer's overall health

Please have a great day <3

Psuedo code and flow charts

Answers

Answer:

pseudo is an informal high level description of the operating principle of an algorithm while a flow chart is a diagrammatic representation that illustrates a solution model to a given problem.

anyone know how to answer questions

Answers

Answer:

yes

Explanation:

what are your questions though? when posting on here you should include the question you would want answered so someone can help you

The ages of ELEVEN(11) students on Environmental Awareness Camp are:
12 9 11 7 10 10 9 9 8 9 11
Find the mean and standard deviation
A. Mean = 9.545; Standard deviation = 1.440
B. Mean = 9.545; Standard deviation = 2.073
C. Mean = 10.5; Standard deviation = 1.440
D. Mean = 10.5; Standard deviation = 2.073

Answers

Answer:

Gonna be smart. This took me a long time.

Explanation:

Result Standard Deviation, σ: 1.3726971700492

Count, N: 11

Sum, Σx: 105

Mean, μ: 9.5454545454545

Variance, σ2:  1.8842975206612

Steps

σ2 =  Σ(xi - μ)2

N=  (12 - 9.5454545454545)2 + ... + (11 - 9.5454545454545)2

11

=  

20.727272727273

11

=  1.8842975206612

σ =  √1.8842975206612

=  1.3726971700492

In simple words. A.

Does anyone who uses Visual Studios 2022 know what tool name it is for the pop up menu? Do not send me links please.​

Answers

Answer:

The Commands and Menu Bar

Explanation:

Answer:

are u using a laptop? if so click the window botton if u download the visual studio code 2022 if u didnt download it use the search bar at the bottom of your screen "type here to search" and type in visual studio code 2022 and it will show up so click on it.

please answer this question​

Answers

The salary calculator program is an illustration of a sequential program

What are sequential programs?

Sequential programs are programs that do not require loops, iterations or conditional statements

How to write the main program

The program written in Python, where comments are used to explain each action is as follows:

#This initializes the base number of hours

baseHours = 40

#This initializes the base payment

basePay = 600

#This initializes the overtime payment

overtimePay = 300

#This initializes the total hours worked

hoursWorked = 45

#This calculates the total payment

totalPay = baseHours * basePay + (hoursWorked - baseHours) * overtimePay

#This prints the total payment

print(totalPay)

Read more about sequential programs at:

https://brainly.com/question/26642771

For optimum computer performance, what features and or characteristics should a
computer possess to efficiently copy any material from an external device?

Answers

A computer should be compactible and possess a good cache memory size, so as to efficiently copy any material from an external device.

What is a computer?

A computer refers to an electronic device that is designed and developed to receive data in its raw form as an input and processes these data into an output (information) that could be used by an end user.

For optimum computer performance, some of the features and or characteristics that a computer should possess, so as to efficiently copy any material from an external device (hard-disk drive) are:

CompatibilityCache memory size.The computer should have a USB 3.0 port.

Read more on computer here: brainly.com/question/959479

Is hacking always wrong? Creating viruses?

Answers

Answer:

yes

Explanation:

Answer:

Not every “hack” is bad, and not every hacker is a criminal. In fact, many hackers secure websites and companies from malicious actors.

creating viruses is done by negative intention hackers

(40 PTS) Be specific
Imagine that your computer came to life, grew some arms and legs, and wants to work as your faithful butler. It only understands the most basic commands, and its only desire is to make you delicious food.
You have a jar of peanut butter, a jar of grape jelly, a loaf of bread, and a knife. How would you explain to your computer the process of making a peanut butter and jelly sandwich? Write the commands below as precisely as possible. (Be sure to use definitions if you’re using functions to complete more than one action!

Answers

Answer:

Take a knife. Cut the bread. Open the jar of peanut butter and jelly. Scope of a big chunk of peanut butter and

write an assembly program that uses the output compare function of a timer to toggle an led every second

Answers

; Set up output compare function

movlw 0x3E

movwf TOCON

; Set up LED port as output

bcf TRISB, 0

; Set up timer

movlw 0xFF

movwf TMR1

movlw 0x60

movwf PR1

; Enable timer and output compare function

bsf T1CON, TMR1ON

bsf T1CON, T1OSCEN

; Main loop

loop:

   ; Wait for output compare event

   btfss T1CON, OCF1

   goto loop

   ; Toggle LED

   bcf PORTB, 0

   btfss PORTB, 0

   bsf PORTB, 0

   ; Clear output compare flag

   bcf T1CON, OCF1

   ; Repeat

   goto loop

Which string method returns true if the character is a lowercase letter?

letter = input("Enter a letter: ")

islower(letter)

isLower(letter)

letter.islower() * is correct

letter.isLower()

Answers

The right answer is : is.lower(letter)

Answer: islower(letter)

Explanation: got it right on edgen

RAM is like a computer’s ______________, while a hard drive is like a computer’s ______________

Answers

Explanation:

RAM is what the computer and the applications run on and hard drive is the type of memory all your files and apps are located on

Please help me answer this in c++, I'm having problems trying to complete this program, thank you!
Modify the mortgage program to display 3 mortgage loans: 7 year at 5.35%, 15 year at 5.5 %, and 30 year at 5.75%. Use an array for the different loans. Display the mortgage payment amount for each loan. Do not use a graphical user interface

Answers

The program is an illustration of loops, and loops are used for iterative purposes

The complete program in C++

The main program is not given, so I will write the new program from scratch.

The program written in C++, where comments are used to explain each action is as follows:

#include<iostream>

using namespace std;

int main(){

   //This declares the required variables

   float monthlyPayment, rate, principalAmount, f;

   int years;    f=1;

.................

See attachment for the complete program

}

Read more about loops at:

https://brainly.com/question/24833629

What are three ways digital identity is created and kept up? (open answer)

Answers

Answer:

Capture attributes as ID documents or biometric data

Explanation:

Examples of such attributes include biometrics, verified identification documents, and third-party verification procedures. To create a trusted digital ID, there are typically three steps: capturing verified attributes, verification of the documents, and digitization of the ID.

Great day :) toodles

Two support services supervisors disagree about a position description for a new help desk position. One said, “The position description should be written as general as possible so we can choose any applicant we want.” The other said, “The position description should be as specific as we can make it so applicants will know whether or not they meet our requirements.” With which supervisor do you agree? Explain why?​

Answers

I aggree with the one that says "The position description should be as specific as we can make it so applicants will know whether or not they meet our requirements.”

Note that when the  specific requirements about a position is made known, it makes the applicant to known if they are fit for that position or not

What is a position description?

The term  position description is also known as "PD" . This is known to be a fact or a statement that talks about the key duties, responsibilities, and role etc. of a position.

It helps to indicates the work to be carried out by the position and when it is specific, one can know if they can do the work or not.

Learn more about position description from

https://brainly.com/question/4677114

the difference between tool bar and status bar​

Answers

Answer:

A toolbar offers easier access to tasks typically conducted within the application whereas in the status bar it is displayed at the lower side of the web browser screens and other application windows.

Explanation:

What is the scope of AS-26

A. All of these
B.Rights and Expenditure on the exploration for or development of Minerals
C. Financial Assets
D. Intangible Assets that are covered by another as

Answers

Answer:

is held for use in the production or supply of goods and services or for rentals to others etc

A system that stores transactions in a single database, but processes them at various sites is referred to as

a. Centralized system.

b. Database management normalization system.

c. Decentralized system.

d. Distributed system

Answers

Answer:

d. Distributed system

Explanation:

this answer is taken from the book Wiley CPAexcel Exam Review 2015 Study Guide July: Business Environment

its important to remember that it is a single database however the processing takes place off-site. this off-site is the key to remembering it is DISTRIBUTED through various sites

You have been asked to investigate a web server for possible intrusion. You identify a script with the following code. What language is the code in and does it seem likely to be malicious? import os, sockets, syslog def r_conn(ip) s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s.connect(("logging.trusted.foo",514))

Answers

The code below is written in JavaScript and does not seem malicious.

What is a Malicious Code?

A Malicious code is one that is not designed for any productive end but to cause disruptions in the computer with the objective of

harming the workstation; or destroying the data stored therein.

There are numerous classifications of malicious codes and they can be identified and removed by an application called an Anti-Virus or malicious app remover.

Learn more about JavaScript at:
https://brainly.com/question/16698901

Other Questions
Claudius: Tis sweet and commendable in your nature, Hamlet,To give these mourning duties to your father:But, you must know, your father lost a father;That father lost, lost his; and the survivor boundIn filial obligation for some termTo do obsequious sorrow; but to preseverIn obstinate condolement is a courseOf impious stubbornness, tis unmanly griefHamlet,William ShakespeareUse the drop-down menus to answer the questions about the passage.Based on the passage, how does Claudius really feel about Hamlets mourning?He thinks that Hamlet mourns too much.What does the passage reveal about the relationship between Claudius and Hamlet?There is tension between them. 3.99 million - 47,000,000 The decimal value of 5/8 Mr. Garcia has 15 boys and 10 girls in his math class. He selects wo students at random to demonstrate how they solved the day's challenge assignment What is the probability that both students are girls? How many molecules is equal to 46.92 grams of SrF2 Please help me with some information to write an essay about My Hobby (Listening to Music). Thanks. 6.1.5: Function definition: Volume of a pyramid.Define a function calc_pyramid_volume with parameters base_length, base_width, and pyramid_height, that returns the volume of a pyramid with a rectangular base.Sample output with inputs: 4.5 2.1 3.0Volume for 4.5, 2.1, 3.0 is: 9.45Relevant geometry equations: Volume = base area x height x 1/3 Base area = base length x base width. I NEED THIS FAST Nell is writing a short story. Read the following excerpt.Keishas heart raced as she waited for her turn to go onstage. She had practiced her dance routine hundreds of times, but she was terrified that she would slip and fall in front of the large audience, which included her dance teacher and her whole extended family. Finally Keisha took a deep breath and trotted to center stage behind the curtain, striking a fierce pose.Which addition to the story would add an element of dramatic irony? A. Keishas performance went off without a snag. Afterward, even her twin brother Colin congratulated her: You didnt even slip and fall down! he joked. B. Keisha danced flawlessly and finished with a grin. As she took her bows, she slipped and landed hard on her tailboneshe hadnt practiced that part. C. As the music began, Keisha moved gracefully around the stage. She did slip once but recovered with a smile, confident that the audience did not notice. D. Backstage, Keishas twin brother Colin chuckled quietly to himself. Above the curtain he had perched a large bucket of waterperfect for dousing his sister and the stage. Identify Structure Each figure below is made up of congruent trapezoids. Find the area of each figure. In one to two sentences, describe the relationship between harmonics and resonance frequency in a piano. J^3 = 0.125 (I dont understand help me please) Escribe, en un prrafo de entre 5 y 10 lneas, las diferencias que encontraste al expresarte de manera oral y escrita. How has social media changed the way that the world accesses and creates news stories? A topic on the theme "Famous Last Words" A 10-inch tire has a diameter of 10 inches. What is the circumference of these tires? Which details of the setting hint that the story takes place long ago? select 3 options. together they climbed up to the center of the island where the trees were thick and high she showed him the graves shingled one- and two-room houses clamped themselves to the rocks like oysters in front of almost all of them was a dory or two, some overturned high dune grass hid the paths up to the houses the chopping block one man was using to split his cordwood Planarians lack dedicated respiratory and circulatory systems because:. What is 1/3 of 9/5 cookies? The molar mass of barium nitrate (ba(no3)2) is 261.35 g/mol. what is the mass of 5.30 1022 formula units of ba(no3)2? 0.0900 g 12.0 g 23.0 g 3,130 g In drawing a circle,what instrument is used to ensure that its radius is 6 cm?