Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem Description: A startup company has developed a handheld laser device for measuring large distances very accurately. Unfortunately, the Python code used to present the

image text in transcribed
Problem Description: A startup company has developed a handheld laser device for measuring large distances very accurately. Unfortunately, the Python code used to present the distance to the user only returns distance measurements in inches. For example, a surveyor on a road construction points the laser at a distant point and the instrument indicates that the distance is 128010.8 inches this is to be converted to miles, rods, yards, feet and inches. A sample hand calculation is shown on the next page. The rod a measurement used by surveyors and is equal to 5.5 yards. See the Units Conversion table below. You are to write a Python program which inputs the laser measurement and converts the inches into these more traditional units. Sample input and output are as follows: Enter the laser measurement (inches): 1234567.89 Output: 19 miles, 155 rods, 1 yards, 0 feet, 1.9 inches Units Conversion: 1 mile =1760 yards =5280 feet =63360 inches 1rod=5.5 yards =16.5 feet =198 inches 1 yard 3 feet =36 inches 1 foot =12 inches Requirements : 1. Use integer division to find quotients. 2. Use the modulus operator to find remainders. 3. Use named constants based on inches for the conversions

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

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions