Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microeconomics An Intuitive Approach with Calculus

Authors: Thomas Nechyba

1st edition

538453257, 978-0538453257

More Books

Students also viewed these Databases questions

Question

Plot a phase portrait for the system in Exercise 8.

Answered: 1 week ago