Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4) (10 pts) Write a script that will prompt the user for a distance in miles, and then a 'K' for kilometers or 'M'

 

4) (10 pts) Write a script that will prompt the user for a distance in miles, and then a 'K' for kilometers or 'M' for meters. The script will convert and print the corresponding distance in the corresponding unit specified by the user. The conversions are: Kilometers = Miles*1.6 Meters Miles*1600 Use two decimal points when displaying numbers. For example, the execution of the script might look like this: >>Enter the distance in miles: 26 >>Do you want to convert to Kilometer (K) or Meter (M)? M >>The distance of 26.00 miles is equal to 41600.00 meters.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Heres a script that prompts the user for a distance in miles and the desired unit of conversion kilo... 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_2

Step: 3

blur-text-image_3

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

Programming Logic & Design Comprehensive

Authors: Joyce Farrell

9th edition

978-1337102070

More Books

Students also viewed these Programming questions

Question

Outline the four basic components of drives according to Freud.

Answered: 1 week ago

Question

10. What is meant by a feed rate?

Answered: 1 week ago

Question

=+1. What is an empirically keyed test?

Answered: 1 week ago

Question

=+3. What is behavioral genetics, and

Answered: 1 week ago