Guest User

Untitled

a guest
Mar 17th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. # Two buses leave the Success Academy High School in Manhattan to take the Top 20 students to a campus visit at Syracuse University. The first bus to leave is driving at 40 mph and the second bus is moving at 50 mph. How long will it take each bus to get 75 miles away from the high school campus? Use the substitution property from Algebra 1
  2.  
  3. mySpeed = input('Enter a speed: ');
  4. speed = float(mySpeed);
  5. myDistance= input('Enter a distance:');
  6. distance = float(myDistance);
  7. myTime = distance / speed;
  8.  
  9. print(myTime)
  10.  
  11. # Two cars start at the same point at 5 o'clock am traveling in opposite directions at 40 mph and 50 mph, respectively. At what time will the cars be exactly 450 miles apart?
  12.  
  13. carSpeed1 = float(input('Enter speed of car 1: '))
  14. carSpeed2 = float(input('Enter speed of car 2: '))
  15. totalSpeed = carSpeed1 + carSpeed2
  16. totalDistance = float(input('Enter distance: '))
  17. time = totalDistance / totalSpeed
  18.  
  19. print(time)
Add Comment
Please, Sign In to add comment