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 one way to measure technological progress?
OLga [1]
You can measure it by the amount of automatisation. The bigger technological process the easier it is to automate systems.
4 0
3 years ago
What is an border in html
kompoz [17]

Borders can be applied to most HTML elements within the body. To make a border around an element, all you need is border-style . The values can be solid , dotted , dashed , double , groove , ridge , inset and outset . border-width sets the width of the border, most commonly using pixels as a value.

8 0
3 years ago
A company needs to store its documents in one place, share news and information with all staff, and allow access for employees w
Greeley [361]
An NAS
Would do The Trick
4 0
3 years ago
PLEASE HELP WILL MARK BRAINLIEST ASAP
Charra [1.4K]

Answer:

This is a heading

Explanation:

This is a paragraph does not exist. You would simply use p for paragraph. Therefore This is a heading is the correct answer.

8 0
3 years ago
A strong example of using keywords would be a. Using “good” to remember the word “hideous” c. Both of these b. Using “hide” to r
posledela

The answer to the question you have asked is <u><em>"B" . </em></u> Because if you really think about it, there is no possible way that "Good" can be a keyword of "Hideous".

6 0
3 years ago
Other questions:
  • If i throw papers in the dryer to help them dry faster could that mess up the dryer?
    5·1 answer
  • The item that is clicked in a JList can be retrieved using the _____ method of JList.
    8·1 answer
  • This is a wise and hard question.....What is the hardest question in the world? I know the answer do you?
    10·1 answer
  • Order the steps to take when drawing electron dot diagrams.
    15·2 answers
  • If a*b = 2a - 56, calculate the value of<br>3 * 4​
    14·1 answer
  • sara has just started using the Internet. She would like to be more efficient . In 3-4, give sara some advice about how to be mo
    5·1 answer
  • How many transponders are contained within a typical satellite?
    12·1 answer
  • A list of sources used for in-text citations that appears at the end of a document is called:
    10·1 answer
  • Write a method called removeHighPrice that will go through a provided ArrayList called prices and removes the first price that i
    6·1 answer
  • Write a method that makes the input string of sentences ending with and
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!