Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The formula for how far you travel with rate and time is distance = rate* time I

ID: 2247818 • Letter: T

Question

The formula for how far you travel with rate and time is distance = rate* time If you travel 60 mph for 90 minutes, then you will go 90 miles. So let's use your algebra to re-arrange this formula and be able to calculate time from distance and the rate of travel. You drive at 70 mph, and you have 140 miles to go then it would take 2 hours. Ask the user for the speed in mph and the number of miles they must travel (3 pt) Let's assume they are both integers. How fast will you be driving in mph?: 50 How far will you be going in miles?: 100 It will take you 2.0 hours to arrive You should use the round function to round to 2 decimal places. x = round(5.928291810, 2) # returns a float of 5.93 If the distance, and rate are integers, then why would the time be an integer?

Explanation / Answer

#!usr/bin/python

b = int(input("How fast will you be driving in mph? : "))
a = int(input("How far will you be going in miles? : "))
c = round(a/b,2)
print("It will take you",c, "hours to arrive")   #In python 3 / (divison) is considered as float divison even if operands are integers

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote