Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The average speed camera system calculates the average car speed by dividing the distance between the two cameras by the time the car spends to

The average speed camera system calculates the average car speed by dividing the distance between the two cameras by the time the car spends to get from the first camera to the second camera.

Write a program to calculate the average speed for a car. The program will prompt the user to enter the time t1 the car has passed by the first camera (in seconds), the time t2 it has reached the second camera (in seconds) and the distance d between the two cameras (in metres). The program will calculate the average speed as:

d (t2 - t1)

The program will also print the speed (in metres per seconds) rounded to two decimal digits.

The program should continue prompting the user to calculate the speed for another car until the user decides to quit. (10 marks)

use python code

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions