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
Maria is comparing her history project's second-place award to her classmate's first-place award. She starts planning how to win
weeeeeb [17]

Answer:

i would say long term

Explanation:

if she is planning for a while on how she is gonna get the first place award and its a long period of time before the next history project i would go with long term

5 0
3 years ago
Read 2 more answers
How many answers do you need to be able to write messages on here??
Kipish [7]

1,000

Hope this helps!



~Courtney

3 0
2 years ago
What is the output of the following code?<br> print (12 // 6)
sveta [45]

Answer:

2

  • See here we have //
  • // means floor division in python.
  • It gives us only the integer part not floating or decimal.

So

12//6=2

8 0
2 years ago
Explain with a few sentences and using the terms sequencing, selections and loops how they
Sever21 [200]

Answer:

here is your answer

Explanation:

voting is electing people to be ruler

mar me as brainliest

5 0
3 years ago
In workstation domain policies, _________________ provide the specific technology requirements for each device. IT staff uses re
Snezhnost [94]

Answer:

The correct word for the blank space is: baseline standards.

Explanation:

Minimum Baseline Standards (MBS) refers to the minimum security guidelines companies set to protect their sensitive data. To achieve such objective, all the devices of an entity -<em>e.g.: servers, routers, and firewalls</em>- must be configured in a form that prevents external or internal attacks. Setting an MBS helps an organization to provide technical support faster since regular users will be working with a system that was implemented by the <em>Information Technology</em> (IT) department of the same association.

6 0
3 years ago
Other questions:
  • Artists who draw images on a computer often use a stylus in conjunction with special _________ tablets, which offer extra-sensit
    15·1 answer
  • Famed science fiction writer H. G. Wells once envisioned something to store vast amounts of information. What did he call it?
    15·2 answers
  • You are to create a program using Python that asks the user for a nonnegative number, then computes the mean and variance using
    15·1 answer
  • The Earth's _______ is ductile overall, tending to flow very slowly and deform in a _______ manner.
    14·2 answers
  • The term computer ________ is used to describe someone who is familiar enough with computers to understand their capabilities an
    12·1 answer
  • Potatocat2UwU da best
    12·1 answer
  • What is the definition of Overflow Error?
    5·1 answer
  • The sun emits invisible _____&gt; A) electromagnetic waves B) Waves C) Radiation D) Wavelength E) Ultraviolet Light
    8·1 answer
  • Why is monitor called softcopy output device?​
    6·1 answer
  • Describe an example of a very poorly implemented database that you've encountered (or read about) that illustrates the potential
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!