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
kiruha [24]
3 years ago
4

You're a swimmer, and you want to compare all of your race times to find the fastest one. write a program that continuously take

s race times as doubles from standard input, until the input is no more races, at which point it should print out the time of your fastest race.
Computers and Technology
2 answers:
MArishka [77]3 years ago
8 0
This program is in pseudocode. Just translate it to your programming language.
Define the following variables
race time as an array of inputted values

Ask race times

Store race times

Ask if there are still races

If yes, loop ask and store races times
If no, display minimum race time in array
makkiz [27]3 years ago
4 0

To find the fastest race among the entire race, enter the race time in seconds and make a list to store them. After that create a loop that will continue till the last race is not completed. Now, compare the race times . In main function, enter the race time or enter no more races. Finally, print the fastest race value. The easiest code in python language is written below in MaxRace.py file.

Further explanation:

Code: MaxRace.py

raceTime=Input(“Enter the race time or enter ‘no more races’:”)

if raceTime!=”no more races”:

fastest_race_time=float(raceTime)

# compare the race times

while raceTime!=’no more races’:

compareTime=float(raceTime)

if fastest_race_time>compareTime:

fastest_race_time=compareTime

raceTime=input(“Enter the race time or enter ‘no more races’:  “)

#print the fastest race

print(fastest_race_time)

else:

print(raceTime)

Output:

Run the commands in python, the output will be looking as below:

Enter the race time or enter ‘no more races’: 49.0

Enter the race time or enter ‘no more races’: 52.0

Enter the race time or enter ‘no more races’: 39.0

Enter the race time or enter ‘no more races’: 23.6

52.0

Learn more:

1. A company that allows you to license software monthly to use online is an example of ? brainly.com/question/10410011  

2. Prediction accuracy of a neural network depends on _______________ and ______________. brainly.com/question/10599832  

Answer details:

Grade: College Engineering

Subject: Computer Science and Engineering

Chapter: Python Programming

Keyword:

Python, input, output, programming, statements,  loops, if-else, print,  while, body, main body, char, int, float, variables, race, time, maximum, compare, code, fastest, seconds

You might be interested in
What is the purpose of an internet protocol address (ip address)? it specifies whether a computer is using a broadband network o
Cloud [144]
<span>It uniquely identifies the location of each computer or device connected to the internet?</span>
7 0
3 years ago
Which element is included in the shot breakdown storyboard? Which element is included in the shot breakdown storyboard?
VladimirAG [237]

Answer: jump out

Explanation:

Took the test and it was correct

5 0
3 years ago
A computer program that enables users to create and work with files and folders is called what?
murzikaleks [220]

Answer:

File manager

Explanation:

From the list of options 1 to 4, only option (2) is correct

Explaining the options one after the other

  • Web browser: It lets users access the internet
  • File Manager: Used to create and manage files/folders
  • User Interface: Means which the user of a computer interacts with the computer
  • File Reader: Used to read the content of a file. e.g. Adobe reader for pdf files, Notepad for text files, etc.

Having explained the options one after the other, <em>the file manager </em>is the answer to this question.

3 0
3 years ago
Read 2 more answers
<img src="https://tex.z-dn.net/?f=%28a%20%2B%20b%29%20%20%7B2%7D" id="TexFormula1" title="(a + b) {2}" alt="(a + b) {2}" align
MariettaO [177]

Answer:

ab2

Explanation:

3 0
2 years ago
​A(n) ____ statement can include rules for site visitors, a statement of copyright in the site design and content, and can restr
laiz [17]

Answer: TOS

Explanation:

 Terms of service is the agreement and the set of rules and regulations for the site visitors. It include all the terms and condition or the disclaimer when addressing the particular website.

Terms of service are set before designing the any type of the site and content in the system that restrict all the types of business that the users conduct in the site.

7 0
3 years ago
Other questions:
  • A technician is tasked to implement a wireless router that will have the fastest data transfer speed at 5 GHz frequency. Which o
    11·1 answer
  • What is an administrator?
    15·1 answer
  • William found out that someone used his report on american culture without his permission. what is william a victim of?
    11·1 answer
  • To filter a list with the Filter function, on an Excel spreadsheet, you need to perform the following steps: (1) click in any ce
    9·1 answer
  • Which type of microscope can only be used to view non-living specimens?
    10·2 answers
  • Which component of the windows desktop allows you to retrieve files that have recently been deleted?
    11·1 answer
  • Do debit cards offer the highest level of fraud pretection?
    10·1 answer
  • What are ip addresses? why are these important for forensic scientists?
    5·1 answer
  • Assume that processor refers to an object that provides a void method named process that takes no arguments. As it happens, the
    7·1 answer
  • How to add a bill using the reciept capture?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!