Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program called feet_conversion.py that inputs a total number of feet and divide that number into miles, furlongs, and feet. (A furlong is

Write a program called feet_conversion.py that inputs a total number of feet and divide that number into miles, furlongs, and feet. (A furlong is some old English measure nobody uses anymore, but let's do it anyway!) 1 mile is 5280 feet, and 1 furlong is 660 feet. Here is an example run of the program: Enter a total number of feet: 12345 12345 total feet is 2 mile(s), 2 furlong(s), and 465 feet. Hint 1: Figure out how to solve the problem yourself by hand on paper. You can't code something you don't know how to solve. Hint 2: You will need to use floor division and remainder (and %). Hint 3: Create a variable for the remaining feet. In the example above, the remaining feet is initially 12345. Once you figure out there are two full miles in 12345 feet (2 full miles is 10560 feet), then the remaining feet is 1785. How many full furlongs are in 1785 feet? Well, 2 again, since 660x2=1320. And finally, after we remove those 1320 from 1785, the remaining feet is 465. Q

Step by Step Solution

3.42 Rating (152 Votes )

There are 3 Steps involved in it

Step: 1

Input the total number of feet from the user totalfeet intinputEnter a total number of feet Calculat... 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

Visual C# How to Program

Authors: Paul J. Deitel, Harvey Deitel

6th edition

134601548, 134601793, 978-0134601540

More Books

Students also viewed these Programming questions

Question

Students graphed their completion of homework on a class report.

Answered: 1 week ago