Write a program called feet_conversion.py that inputs a total number of feet and divide that number...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
Input the total number of feet from the user totalfeet intinputEnter a total number of feet Calculat... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
The gradient of a scalar-valued function g: RR is the column vector of length n, denoted as Vg, containing the derivatives of components of g with respect to the input variables: (Vg()); = (a), i =...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Are there dangers with incarcerating young people in detention facilities? What about the potential for negative long-term impact? Using three documented examples of misconduct/mistreatment of youth...
-
Identify each of the following items as revenues, expenses, or withdrawals from the drop down provided. 1. Advertising expense 2. Consulting revenue 3. Rent expense 4. Rental income 5. Wages expense...
-
An object to the left of a lens is imaged by the lens on a screen 30.0 cm to the right of the lens. When the lens is moved 4.00 cm to the right the screen must be moved 4.00 cm to the left to refocus...
-
Reconsider the experiment described in Problem 6-1. Suppose that the experimenter only performed the eight trials from replicate I. In addition, he ran four center points and obtained the following...
-
In each of the following situations, indicate the statistical analysis you would conduct and the appropriate test or test statistic that should be used. a. Respondents in a survey of 1,000 households...
-
Telluride Tours is currently evaluating two mutually exclusive investments. After doing a scenario analysis and applying probabilities to each scenario, it has determined that the investments have...
-
Stuart Daniels estimates that he will need $ 2 2 , 0 0 0 to set up a small business in 7 years. ( a ) How much ( in $ ) must Stuart invest now at 8 % interest compounded quarterly to achieve his goal?
-
Assume that you are using attribute sampling to test the controls over revenue recognition of the Packet Corporation, a public company, and will use the results as part of the evidence on which to...
-
In general, students are expected to meet the following objectives: 1) To ascertain cost of capital for a new project by using cost of capital of existing firms operating in the same business. (2)...
-
A 320,000 SF industrial property is under consideration for purchase. It currently rents for $4 PSF. Two nearby properties have recently sold and are comparable in size, design, and age. One property...
-
In advising a client you are considering adding a mutual fund, FundsRUs, to the client's portfolio of investments. The fund has a beta coefficient of 1.35 and currently the return on an average risk...
-
What are the risks to both a nation as well as economy if it becomes "common place" for the government to bailout out industries and/or individual citizens
-
Calculate an estimate of the price change for a 3 year bond with a Modified duration of 1.898 years, assuming the bonds yield to maturity goes from 10 percent to 9.5 percent. If the bond's yield to...
-
What contribution would make and to whom if better understanding the investor behavior during covid 19?
-
How accurate are measures of poverty? Measures of poverty, such as the poverty rate, are A inaccurate in that they include noncash benefits such as food stamps. B. inaccurate in that they are based...
-
At 31 December 20X9, the end of the annual reporting period, the accounts of Huron Company showed the following: a. Sales revenue for 20X9, $ 2,950,000, of which one- quarter was on credit. b....
-
Find and correct the error in each of the following code segments: a) const int ArraySize = 5; ArraySize = 10; b) Assume var b = new int[10]; for (var i = 0; i
-
Find the error(s) in each of the following code segments and explain how to correct it: a) i = 1; while (i
-
In the text, we say that after the merge sort splits the array into two subarrays, it then sorts these two subarrays and merges them. Why might someone be puzzled by our statement that it then sorts...
-
Approximately 50,000 new titles, including new editions, are published each year in the United States, giving rise to a $25 billion industry in 2001. In terms of percentage of sales, this industry...
-
When you think of political persuasion, you may think of the effortsthat political campaigns undertake to persuade you that their candidate is betterthan the other candidate. In truth, campaigns are...
-
In late 2013, the taxi company Yourcabs.com in Bangalore, India, was facing a problem with the drivers using their platformnot all drivers were showing up for their scheduled calls. Drivers would...
Study smarter with the SolutionInn App