Question: 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
Input the total number of feet from the user totalfeet intinputEnter a total number of feet Calculat... View full answer
Get step-by-step solutions from verified subject matter experts
