Question

Write a Python program that will ask for distance, then compute the travel time for speed...

Write a Python program that will ask for distance, then compute the travel time for speed starting at 10 MPH to 90 MPH with an increment of 10.

Use the equation t = d/v

Where t is the time, d is the distance, and v is the speed of MPH

0 0
Add a comment Improve this question Transcribed image text
Answer #1
distance = float(input("Enter distance: "))
for v in range(10,91,10):
    t = distance/v
    print(t)

Add a comment
Know the answer?
Add Answer to:
Write a Python program that will ask for distance, then compute the travel time for speed...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The distance a vehicle travels can be  calculated as follows: distance = speed * time. For...

    The distance a vehicle travels can be  calculated as follows: distance = speed * time. For example, if a train travels 40 miles per hour for three hours, the distance traveled is 120 miles. Write a program using python that asks the user for the speed of a vehicle in mph and the number of hours it has traveled. It should then use a while loop to display the distance the vehicle has traveled for each hour of that time...

  • IN PYTHON Write a program that takes a user-input distance and speed and then calculates an...

    IN PYTHON Write a program that takes a user-input distance and speed and then calculates an ETA. Your program should work for ANY COMBINATION of distance and speed.

  • How to write a program in python for "speed violation calculator" with a while loop and...

    How to write a program in python for "speed violation calculator" with a while loop and if statements. calculate the number of miles over the speed limit and display it. ask for the speed limit and the drivers speed the speed limit should be at least 20 but not greater than 70 if the driver's speed is less then the speed limit the driver was not speeding program should calculator and display the number of mph over the speed limit...

  • The speed of a vehicle is inversely proportional to the time it takes to travel a...

    The speed of a vehicle is inversely proportional to the time it takes to travel a fixed distance. If a vehicle travels a fixed distance at 60 miles per hour in 20 minutes, how fast must it travel to cover the same distance in 10 minutes? A. 120 mph 1 OB. 30 mph OC. 30 mph 10 OD mph

  • Write a program using python that determines the distance to a lightning strike based on the...

    Write a program using python that determines the distance to a lightning strike based on the time elapsed between the flash and the sound of thunder. The speed of sound is approximately 1120 ft/sec and 1 mile is 5280 ft. You need to use a function for this program. It needs to take a single argument and return a single value.

  • Please have it written in Python. The distance a vehicle travels can be calculated as follows:...

    Please have it written in Python. The distance a vehicle travels can be calculated as follows: distance 5 speed 3 time For example, if a train travels 40 miles per hour for three hours, the distance traveled is 120 miles. Write a program that asks the user for the speed of a vehicle (in miles per hour) and the number of hours it has traveled. It should then use a loop to display the distance the vehicle has traveled for...

  • write in python Create a program that will ask the user for a list of integers,...

    write in python Create a program that will ask the user for a list of integers, all on one line separated by a slash. construct a list named "adj_numbers" which contains the users input numbers after subtracting 2 from each number. then print the resulting list. the input statement and print statement are given to you in the starting code. a sample run of the program is as follows: Enter a list of integers, separated by slashes: 7/3/6/8 resulting list:...

  • Need to use Python string formatting to align wind-chill values in equal-sized columns Using your knowledge...

    Need to use Python string formatting to align wind-chill values in equal-sized columns Using your knowledge of loops and other Python features covered so far, write a program that prints a table of windchill values, where: Rows represent wind speed for O to 50 in 5 mph increments Columns represent temperatures from -20 to +60 in 10-degree increments Your program should include a function that returns windchill for a given combination of wind speed & temperature, using this formula from...

  • Python code Write a program that will ask the user to input two strings, assign the...

    Python code Write a program that will ask the user to input two strings, assign the strings to variables m and n If the first or second string is less than 10 characters, the program must output a warning message that the string is too short The program must join the strings m and n with the join function The output must be displayed. Please name the program and provide at least one code comment (10)

  • Calculate the average round-trip travel distance and travel time for each zone. Assume that people in...

    Calculate the average round-trip travel distance and travel time for each zone. Assume that people in Zone 0 have a travel distance and time of zero. Every other zone has increasing travel time and distance. Next, using average cost per mile and per hour of travel time, calculate the travel cost per trip. A standard cost per mile for operating an automobile is readily available from AAA or similar sources. Assume that cost per mile is $.30, or use the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT