Question: This question has two parts. Part 1. Part 2. Write some pseudo-code to solve the problem. You can include a diagram as part of

This question has two parts. Part 1. Part 2. Write some pseudo-code

 

This question has two parts. Part 1. Part 2. Write some pseudo-code to solve the problem. You can include a diagram as part of your answer if necessary. Write some JavaScript code based on the answer to Part 1. A car takes 4 hours to cover a distance if it travels at a speed of 40mph (Miles Per Hour). What should be its speed to cover the same distance in 1.5 hours? You must write a program that will take the speed at which the car travels (s) and the time (t) to work out the distance covered (d) by the car in 4 hours. Then use the previously calculated distance to calculate the speed at which the car should travel to cover the same distance in 1.5 hours. Your program should print the car's speed to the console to 2 decimal places in m/h and say how much faster the car has to travel. Variables Speed (s): Distance (d): ?m Time (t): D=s*t 40 m/h 4 hours 40 m/h

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!