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...
-
What is the thinnest film of a coating with n = 1.42 on glass (n = 1.52) for which destructive interference of the red component (650nm) of an incident white light beam in air can take place by...
-
Based on your experience as a driver or a passenger in a car, estimate (with calculations) the maximum deceleration achieved by putting maximum pressure on the brakes when traveling at 30 mph.
-
What is a double-barreled question?
-
Consider the following forecast results. Calculate MFE, MAD, and MAPE, using the data for the months January through June. Does the forecast model under- or over-forecast? MONTH ACTUAL DEMAND...
-
When Sergei's opened, it had to purchase most of its kitchen equipment. The equipment cost $ 4 0 , 0 0 0 new plus $ 5 , 0 0 0 to install. If food processing equipment is in the 1 0 years MACRS class,...
-
The following information is available for ADT Company, which produces special-order security products and uses a job order costing system. Overhead is applied using a predetermined overhead rate of...
-
You have one million USD and want to create a portfolio equally as risky as the market. Given this information, fill in the rest of the following table: Asset Investment Beta Stock A $200,000 0.95...
-
What are the credit card score ranges and how are they used? Why is it important for you to establish a good credit history? Why do banks use your credit score when determining eligibility for...
-
What is Sweet Wave's opportunity cost if it chooses to buy the cherry pie filling and start manufacturing the gluten free pie crust? Do not use commas in your responses. For negative answers, please...
-
The Pantene Company is subject to income taxes of 20% on income through $25,000 and 40% on income in excess of $25,000. Projected information for next year follows: Selling price per unit $40...
-
"Two Parts Gore and One Pinch Walking Dead: What Exactly Is Horror Fiction?" by Linda Holland-Toll. 1. Why do you think Holland-Toll uses the word dis/ease with a separation between the prefix and...
-
You will sell Microfridges at a price of $450, but you will have to pay a fee of $50 per unit to an independent distributor who will make the actual sales for you. How many Microfridges would you...
-
You have decided to buy a new tool for $5,500 and agreed to pay in 30 equal monthly payments at 6% APR on the unpaid balance. How much do you pay monthly?
-
Wilsons Auto Repair ended 2011 with Accounts Receivable of $85,000 and a credit balance in Allowance for Uncollectible Accounts balance of $11,000. During 2012, Wilsons Auto Repair had the following...
-
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.
-
Using tha data file usmacro, estimate the ARDL \((2,1)\) model Your estimates should agree with the results given in equation (9.42). Use these estimates to verify the forecast results given in Table...
-
Using the data file usmacro, estimate the \(\operatorname{AR}(1)\) model \(G_{t}=\alpha+\phi G_{t-1}+v_{t}\). From these estimates and those obtained in Exercise 9.16, use the results from Exercise...
-
Consider the \(\operatorname{ARDL}(p, q)\) equation and the data in the file usmacro. For \(p=2\) and \(q=1\), results from the LM test for serially correlated errors were reported in Table 9.6 for...
Study smarter with the SolutionInn App