Write a program that converts feet to fathoms. Look up the conversion factor and assign it...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that converts feet to fathoms. Look up the conversion factor and assign it to a properly named constant (see page 80). The program should permit the user to enter the feet perhaps with decimals, from the keyboard. Print the result showing both distances using an f_string with the fathoms accurate to three decimal places. Required Output Enter the feet 22.3 22.3 feet are 3.717 fathoms program2_2.py Write a program that prompts the user to enter only the dollar amount (no cents) of an item less than or equal to 50 dollars. Assume the customer is paying with a 50 dollar bill. Store that amount in a properly named constant as an integer. Assume that no tax and no other fees are being applied. The program should give change with the largest bills possible, starting with 20's, then 10's then 5's, then finally ones. Review the Python math operators on page 54 and use f_string printing. Ensure that your program's output is formatted as identified in the example output below. Example Output Enter the cost in dollars: 34 Bills dispensed as change: $20-0 $10 - 1 $5 <-1 $1 1 program2_3.py A taxable item named Widgets is available in multiple quantities at a base price of $24.99. In your program, store the base price in a properly named constant as a decimal. Prompt the user for the number (integer amount) of Widgets being purchased. The sales tax rate is 7%. Store the tax rate in a properly named constant as a decimal. The shipping & handling cost is 1 dollar per Widget. Store the shipping and handling cost in a properly named constant. Calculate and print a receipt that includes the subtotal, the quantity, and the base cost on one line; the shipping and handling amount on the next line; the sales tax on the next line; and the total amount due on the last line after skipping a line. Ensure that your program's output is formatted as identified in the example output below, which includes a title prior to the data being printed. Display commas for numbers of 1,000 or more. Use dollar signs for dollar amounts and allow for two decimal places for cents. Note the apostrophe in Widgets' in the Example Output below. Your program should include that, too. As a reminder use f_string for all printing. Example Output How many Widgets do you want? => 30000 RECEIPT Widgets' base cost : $749,700.00 (30,000 @ $24.99) S&H $30,000.00 Tax: $52,479.00 Total: $832, 179.00 Write a program that converts feet to fathoms. Look up the conversion factor and assign it to a properly named constant (see page 80). The program should permit the user to enter the feet perhaps with decimals, from the keyboard. Print the result showing both distances using an f_string with the fathoms accurate to three decimal places. Required Output Enter the feet 22.3 22.3 feet are 3.717 fathoms program2_2.py Write a program that prompts the user to enter only the dollar amount (no cents) of an item less than or equal to 50 dollars. Assume the customer is paying with a 50 dollar bill. Store that amount in a properly named constant as an integer. Assume that no tax and no other fees are being applied. The program should give change with the largest bills possible, starting with 20's, then 10's then 5's, then finally ones. Review the Python math operators on page 54 and use f_string printing. Ensure that your program's output is formatted as identified in the example output below. Example Output Enter the cost in dollars: 34 Bills dispensed as change: $20-0 $10 - 1 $5 <-1 $1 1 program2_3.py A taxable item named Widgets is available in multiple quantities at a base price of $24.99. In your program, store the base price in a properly named constant as a decimal. Prompt the user for the number (integer amount) of Widgets being purchased. The sales tax rate is 7%. Store the tax rate in a properly named constant as a decimal. The shipping & handling cost is 1 dollar per Widget. Store the shipping and handling cost in a properly named constant. Calculate and print a receipt that includes the subtotal, the quantity, and the base cost on one line; the shipping and handling amount on the next line; the sales tax on the next line; and the total amount due on the last line after skipping a line. Ensure that your program's output is formatted as identified in the example output below, which includes a title prior to the data being printed. Display commas for numbers of 1,000 or more. Use dollar signs for dollar amounts and allow for two decimal places for cents. Note the apostrophe in Widgets' in the Example Output below. Your program should include that, too. As a reminder use f_string for all printing. Example Output How many Widgets do you want? => 30000 RECEIPT Widgets' base cost : $749,700.00 (30,000 @ $24.99) S&H $30,000.00 Tax: $52,479.00 Total: $832, 179.00
Expert Answer:
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Posted Date:
Students also viewed these programming questions
-
31% of American adults surveyed stated that giving up their phone for a day would be more difficult than giving up their significant other. In 2012, the United States population over the age of 18...
-
How does the concept of intersectionality, as developed by Kimberl Crenshaw, challenge traditional understandings of identity and social categorization by highlighting the interconnectedness and...
-
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...
-
A rectangular field will have one side made of a brick wall and the other three sides made of wooden fence. Brick wall costs 20 dollars per meter and wooden fence costs 30 dollars for 3 meters. The...
-
Journalize the following sales transactions for Morris Supply. Explanations are not required. Mar. 1 Morris Supply sold merchandise inventory for $3,000. The cost of the inventory was $1,800. The...
-
Reasoning by assumption of a minimum model is important in human everyday life. Work out two more examples that assume minimum models.
-
When you consider that companies are generally in business to earn a profit, why might it be acceptable to select a capital project that promises a return that is just equal to the weighted average...
-
Incomplete manufacturing costs, expenses, and selling data for two different cases are as follows. Instructions (a) Indicate the missing amount for each letter. (b) Prepare a condensed cost of goods...
-
Consider a position consisting of a $100,000 investment in assetA and a $100,000 investment in asset B. Assume that the dailyvolatilities of both assets are 1% and that the coefficient ofcorrelatio 2...
-
A work sheet for Juanita's Consulting is shown on the following page. There were no additional investments made by the owner during the month. REQUIRED 1. Prepare an income statement. 2. Prepare a...
-
How many subsidiaries do Woolworths and Wesfarmers have? Howmany percentages do these are fully owned? Can you tell why acompany might choose to make a fully investment given they need farless than 1...
-
How gyroscopic couple affect the motion of an aeroplane while taking a turn.
-
In a Proell governor, the mass of each ball is 5 kg and central load on sleeve is 50 kg. The length of each upper and lower arms is 250 mm. The minimum and maximum radii are 120 mm and 180 mm...
-
What is conjugate action in gears?
-
How a four-wheeled vehicle is affected by gyroscopic couple?
-
Explain path of recess and path of approach.
-
Current ratio and quick ratio are two measures of liquidity for a company. 7. If a company holds a return on assets of 47.6%, they are earning .476 cents on every dollar of assets. 8. If a company...
-
Doorharmony Company makes doorbells. It has a weighted- average cost of capital of 5% and total assets of $ 5,900,000. Doorharmony has current liabilities of $ 750,000. Its operating income for the...
-
Write an SQL statement that will insert a new row into the Stock table. The row should have the following column values: TradingSymbol: XYZ CompanyName: XYZ Company NumShares: 150 PurchasePrice:...
-
What Graphics class methods do you use to perform the following tasks? a) Draw a line. b) Draw a filled rectangle. c) Draw a filled oval. d) Draw a filled arc. e) Set the drawing color. f) Draw a...
-
True or False: You can store either text or an image in a JLabel object, but not both.
-
Lily Bakeries, located in Belgium, specializes in biscuit and cake products. Lily owns 75 percent of Hearty Foods, a French company acquired on January 1, 2013, for cash and stock totaling 150...
-
Mirror Resorts, Inc., a U.S. company, acquires an 80 percent interest in Silver Nugget Company on January 1, 2016, for \($80\) million cash. The estimated fair value of the 20 percent noncontrolling...
-
On January 1, 2016, Pine Mountain Resorts acquires a 60 percent interest in Shawnee Peak Enterprises for \($25.4\) million in cash. The date-of-acquisition fair value of the noncontrolling interest...
Study smarter with the SolutionInn App