Romeo Jr M Manlocot
BSIT 3.2B
05_Laboratory_Exercise_1
start_location = input("Enter the starting location: ")
destination = input("Enter the destination: ")
mode_of_transport = input("Enter the mode of transport (e.g., car, bus, bike): ")
distance = float(input("Enter the distance (in kilometers): "))
speed = float(input("Enter the speed (in km/h): "))
travel_time = distance / speed
rest_stop_recommended = travel_time > 5
print("\n--- Travel Details ---")
print(f"Starting Location: {start_location}")
print(f"Destination: {destination}")
print(f"Mode of Transport: {mode_of_transport}")
print(f"Distance: {distance} km")
print(f"Speed: {speed} km/h")
print(f"Estimated Travel Time: {travel_time:.2f} hours")
if rest_stop_recommended:
print("Warning: Travel time exceeds 5 hours. A rest stop is recommended.")
else:
print("Travel time is within 5 hours. No rest stop is necessary.")