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
For which of the following values of A and B will the expression A || B be true?
Blababa [14]

Answer:

A = False, B = True

Explanation:

|| is equal OR. To the expression be true, you need one of them to be true or both.

A = TRUE, B = FALSE

Returns true

A = FALSE, B = FALSE

Returns true

A = TRUE, B = TRUE

Returns true

7 0
3 years ago
When you first open a ms word document, what is the name of the document located on the first line of the document?
VladimirAG [237]
When you first open a Microsoft Word document, the first line of text in the document is pre-filled in as the document's file name. You can also change the filename of the document, by typing in a new one. But if you don't type a new one, then the filename will remain as the first line of your document.
4 0
4 years ago
A certain social media Web site allows users to post messages and to comment on other messages that have been posted. When a use
garri49 [273]

Answer:

A or S most likely (I think)

7 0
3 years ago
Write any two features of Guided media​
BaLLatris [955]

Answer:

<h3>Guided media, which are those that provide a conduit from one device to another, include twisted-pair cable, coaxial cable, and fiber-optic cable. Guided Transmission Media uses a "cabling" system that guides the data signals along a specific path. The data signals are bound by the "cabling" system.</h3>

pa brainliest po thank you

6 0
3 years ago
What is the maximum number of charters of symbols that can be represented by UNicode?
Sati [7]

Answer: 16 bit

Explanation:

4 0
4 years ago
Other questions:
  • O que é sistema distribuido?
    8·1 answer
  • What is the process of designing green buildings called
    9·2 answers
  • How is the illusion of animation achieved using Sprites with multiple costumes?
    12·1 answer
  • Consider the following relationship involving two entities, students and classes:A student can take many classes. A class can be
    9·1 answer
  • In java, a class that is defined without an explicit extends clause ____.
    15·2 answers
  • There are generally two ways of implementing dynamic programming solutions to problems, which have equal asymptotic time complex
    13·1 answer
  • The base 10 number 18 is equal to which base 16 number?<br><br> 10<br><br> 12<br><br> 14<br><br> 16
    11·1 answer
  • Написати лабараторну, на тему:Вивчення властивостей та застосування шаруватих пластиків та кермаміки
    13·1 answer
  • Give three general reasons for the importance of computer networking.
    9·1 answer
  • if a manager identifies numerous data integrity issues, she/he should consider the reports generated from that data as invalid a
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!