About 1,570,000 results
Open links in new tab
  1. python - Loop Table using distance = speed * time - Stack Overflow

    Sep 30, 2017 · distance = speed * time Write a program that asks the user for the speed of a vehicle (in miles per hour) and how many hours it has traveled. The program should then use …

  2. Chapter 4 – #4: Distance Traveled – Tony Gaddis – Starting Out With Python

    Jun 22, 2023 · 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 …

  3. Python/Time, Distance, and Speed - Wikiversity

    Jan 18, 2025 · This piece of code can calculate the total distance, time and speed. If you run the code you first enter the values such as the total speed of a car, the time it took and the …

  4. Displaying calculations using a loop in Python - Stack Overflow

    Jul 19, 2018 · #This program uses a loop to display #distance traveled over time. print('This program calculates distance traveled') print('for a vehicle traveling at a constant speed.') #Gets …

  5. Distance Traveled - Python Fiddle

    Apr 16, 2015 · For loop that calculates distance traveled in Miles when user enters speed in MPH and time in hours traveled.

  6. python - How to work out speed from distance as a float and time

    Feb 7, 2017 · Use distance / ( time.total_seconds() / 3600.0 ) (assuming distance is already in km).

  7. Calculate Distance Traveled - Python Program - CodePal

    A Python program that prompts the user to enter the average speed and time traveled by a vehicle, and calculates the distance traveled at each hour of the journey.

  8. Solved Python code only. The distance a vehicle travels can

    Write a program that asks the user for the speed of a vehicle (in miles per hour) and the number hours it has traveled. It should then use a loop to display the distance the vehicle has traveled …

  9. Write a python program to calculate speed in km/hr (speed = distance

    Oct 3, 2021 · A python program to calculate speed in km/hr: distance = float(input("Enter the distance in km: ")) time = float(input("Enter the time in hours: ")) speed = distance/time. …

  10. Chapter 2 – #5: Distance Traveled – Tony Gaddis – Starting Out With Python

    May 14, 2020 · Assuming there are no accidents or delays, the distance that a car travels down the inter- state can be calculated with the following formula: Distance= Speed * Time. A car is …

  11. Some results have been removed
Refresh