Question: Assignment One: Input, Output, Processing, Decision Making In this program, you are going to create a tip calculator. Your program will ask the user to

 Assignment One: Input, Output, Processing, Decision Making In this program, you

Assignment One: Input, Output, Processing, Decision Making In this program, you are going to create a tip calculator. Your program will ask the user to enter the price of their meal (pre-tax) and how much tip they want to give (15, 20, 25), etc. Your program will then output the total they should pay, including the tip and sales tax. Since sales tax differs per state, you will also have the user enter in what state they are in. Mandatory choices for sales tax: If they type in "PA," the sales tax will be 6%. If they type in "NY," the sales tax will be 8.87%. If they type in DE," the sales tax will be 0%. Anything else, the sales tax will be a default of 5%. Additionally: 1. Tip will be calculated pre-tax. Therefore, you should calculate the sales tax of the meal separately, calculate the tip on the meal separately, then add these values to the total bill. 2. Your program should display both the tip on the meal and the total price of the meal. Both values should be formatted to 2 decimal places. The section "Formatting Numbers" on page 68 of your textbook should help you with this. 3. Your output should display the $ symbol for your amounts, with no spaces between the dollar sign and the amount. (pages 70-71 of your textbook will help with this). 4. You will need to include if-elif-else statements with the sales tax options listed above. Requirements: 1. 3 Inputs: price of the meal, state abbreviation, the amount of tip to be paid 2. 2 outputs: the complete tip that will be left, the total price that is paid on the bill a. In the output, you should also indicate what state they selected 3. You should allow for float values to be entered for the price of the meal and the tip 4. Use variable names in your program that are easy to identify 5. Include your own name and the assignment number on your program in comments at the top of the program Sample Output (text in bold is sample user input): What is the price of your bill? 213.50 What is the state you are eating in? DE What percent tip would you like to leave? 20 The tip left is $42.70 The total bill in DE is $269.01

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!