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
which of these tools stick to the edge of an image, thus making it easy to select the shape of an image
USPshnik [31]

Answer:

ljb lih lug outbpiyougvotvoy

outiyfiyfiyfiyffiyvitfurcutfcutcrcutfutcdu

Explanation:

didn't understand the question

3 0
3 years ago
3.6 Code Practice on Edhesive
Alchen [17]

I've included my code in the picture below. Best of luck.

6 0
3 years ago
Select the correct answer.
Softa [21]

Answer:

MY ANSWER IS B.

Explanation:

B.A+(B.C)

3 0
3 years ago
What is this error SyntaxError: Unexpected token '??='
vesna_86 [32]

Answer:

Occurs when a specific language construct was expected, but something else was provided.

6 0
3 years ago
_______ is the protocol suite for the current Internet.
Gala2k [10]
A? not very sure sorry
8 0
3 years ago
Other questions:
  • Part 3a. Largest power of two less than (10 pts) Implement the method public static int largestPow2LessThan(int n) which calcula
    5·1 answer
  • What item on a business card is generally the most prominent?
    13·2 answers
  • Universal Containers is implementing a community of High-Volume Community users. Community users should be able to see records a
    12·1 answer
  • ⭐️⭐️⭐️ what Network is larger in size? MAN or WAN? Thank you ⭐️⭐️⭐️
    5·1 answer
  • What will be displayed as a result of executing the following code?
    5·1 answer
  • The limitation of trade secret protection for software is that it is difficult to prevent the ideas in the work from falling int
    9·1 answer
  • What advantage does a circuit-switched network have over a packet-switched network? What advantages does TDM have over FDM in a
    6·1 answer
  • What is IaaS? For this service model, what are the resources the cloud vendor will provide/manage and what are the resources the
    15·1 answer
  • Write a logical expression using only and, or and not that is equivalent to the Exclusive NOR (XNOR) gate on 2 inputs, called in
    15·1 answer
  • Debra tracks her business finances in a spreadsheet. She wants to figure out how much she could increase profits if she raises p
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!