Ответ:
Питон:
distance = float(input("Enter the distance (in km): "))
speed = float(input("Enter the speed (in km/h): "))
time = distance / speed
print("The time it takes to travel", distance, "km at a speed of", speed, "km/h is", time, "hours")
Джава:
Enter the distance (in km): 240
Enter the speed (in km/h): 80
The time it takes to travel 240.0 km at a speed of 80.0 km/h is 3.0 hours
distance = float(input("Enter the distance in km: "))
speed = float(input("Enter the speed in km/h: "))
print("Time: ", time, "hours")
Объяснение:
Пример: Enter the distance in km: 240
Enter the speed in km/h: 80
Time: 3.0 hoursнаписано на питоне
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Ответ:
Питон:
distance = float(input("Enter the distance (in km): "))
speed = float(input("Enter the speed (in km/h): "))
time = distance / speed
print("The time it takes to travel", distance, "km at a speed of", speed, "km/h is", time, "hours")
Джава:
Enter the distance (in km): 240
Enter the speed (in km/h): 80
The time it takes to travel 240.0 km at a speed of 80.0 km/h is 3.0 hours
Ответ:
distance = float(input("Enter the distance in km: "))
speed = float(input("Enter the speed in km/h: "))
time = distance / speed
print("Time: ", time, "hours")
Объяснение:
Пример:
Enter the distance in km: 240
Enter the speed in km/h: 80
Time: 3.0 hours
написано на питоне