Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How do I fix my code to so that it properly runs the way the problem wants it to? It currently is showing errors when

How do I fix my code to so that it properly runs the way the problem wants it to? It currently is showing errors when I try to run it. The problem from the textbook is photographed below. The question is #2. My code is also photographed below.
image text in transcribed
image text in transcribed
multiplied times 10, enter his or her first 9. Write a function named times ten that decu function is called, it should return the value of its argument multiplie 10. Write a function named get_first_name that asks the user to enter name, and returns it. ometers, then converts that Programming Exercises 1. Kilometer Converter Write a program that asks the user to enter a distance in kilometers, then ce distance to miles. The conversion formula is as follows: Miles = Kilometers X 0.6214 2. Sales Tax Program Refactoring Programming Exercise #6 in Chapter 2 was the Sales Tax program. For that exercise were asked to write a program that calculates and displays the county and state sales on a purchase. If you have already written that program, redesign it so the subtasks are functions. If you have not already written that program, write it using functions, 3. How Much Insurance? Many financial experts advise that property owners should ioware their homes or buildings for at least 80 percent of the amount it would cost to replace eructure. Write a program that asks the user to enter the replacement cost of a buildi n displays the minimum amount of insurance he or she should buy for the property. 4. Automobile Costs Write a program that asks the user to enter the monthly costs for the following expenses incurred from operating his or her automobile: loan payment, insurance, gas, oil, tires, any maintenance. The program should then display the total monthly cost of these expense and the total annual cost of these expenses. 5. Property Tax A county collects property taxes on the assessment value of property, which is 60 pery the property's actual value. For example, if an acre of land is valued at $10,000, 10 ment value is $6,000. The property tax is then 72 for each $100 of the assessmen The tax for the acre assessed at $6,000 will be $43.20. Write a program that as actual value of a piece of property and displays the assessment value and property 6. Calories from Fat and Carbohydrates A nutritionist who works for a fitness club helps members by evaluating their diets of her evaluation, she asks members for the number of fat grams and carbohy that they consumed in a day. Then, she calculates the the fat, using the following fou1 Is 60 percent of 10,000, its assess assessment value fram that asks for the operty tax. at grams and carbohydrate gran File Edit Format Run Options Window Help def price(): price = float (input("please enter the amount of the purchase: ")) def StateTax(): StateTax = 0.05 price der Countytax(): CountyTax = 0.025 * price def TotalTax(): TotalTax - State Tax + CountyTax def TotalSale(): TotalSale = price + TotalTax price () State Tax () Count () TotalTax() Total sale() print("Your total after taxes is: " + str (Totalsale)) print("Total State tax: $" +str (StateTax)) print("Total County tax: $" +str (Countytax)) print("Total tax overall: " +str (TotalTax)) Type here to search

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Step: 3

blur-text-image

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

How does selection differ from recruitment ?

Answered: 1 week ago