1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ladessa [460]
2 years ago
8

Ask the user for a total food bill and then find the new total after 6% tax and a tip of the users choice (15, 18, 20%) in pytho

n.
Computers and Technology
1 answer:
chubhunter [2.5K]2 years ago
3 0

Answer:

#here is code in python.

# read the food bill

tot_bill=float(input("Please enter the food bill:"))

# tax on food

tax=0.06

#choice for tip by user

choice=int(input("enter your choice for tip:(1 for 15%, 2 for 18% and 3 for 20% :)"))

// calculate the total food bill

if choice==1:

   tot_food_bill=tot_bill+tot_bill*tax+tot_bill*(.15)

elif choice==2:

   tot_food_bill=tot_bill+tot_bill*tax+tot_bill*(.18)

elif choice==3:

   tot_food_bill=tot_bill+tot_bill*tax+tot_bill*(.2)

else:

   print("invalid choice:")

#print the total food bill

print("total food bill is ",tot_food_bill)    

Explanation:

Read the food bill from user and assign it to variable "tot_bill".Initialize the tax=0.06 (i.e. 6%) on the bill.Then ask user to give his choice for tip. if the choice is 1 then tip will be 15%, if 2 then 18% and if choice is 3 Then tip will be 20% of the bill.Calculate the total food bill and assign it to variable "tot_food_bill".

Output:

Please enter the food bill:100                                                                                                                                

enter your choice for tip:(1 for 15%, 2 for 18% and 3 for 20% :)2                                                                                            

total food bill is  124.0

You might be interested in
Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off, and checki
vaieri [72.5K]

Answer:

yes?

Explanation:

8 0
2 years ago
Memorex Disks sells computer disk drives with right-of-return privileges. Returns are material and reasonably predictable. Memor
pychu [463]

Memorex should: iv. record a refund liability in the year of the sale.

<h3>What is a right-of-return privilege?</h3>

A right-of-return privilege can be defined as a special right, advantage or entitlement that is accorded to a customer, which avails them an opportunity to return a product they have purchased.

Since Memorex Disks offers its customers right-of-return privileges, it is expected that it should record a refund liability in the year of the sale i.e recording an allowance for sales returns in the year the sale was made.

Read more on right-of-return privilege here: brainly.com/question/17165436

#SPJ1

5 0
2 years ago
What are two benefits of consumer programs
Tcecarenko [31]

They help consumers identify the best product reviews from various sources.

They help prosecute companies that sell unsafe products to consumers.

5 0
3 years ago
Select the correct term to complete the sentence.
Marat540 [252]

Answer:

A program that searches a database for specific words and returns a list of webpages or documents in which the search term was found. ... A _____ is an application that runs in a

Explanation:

6 0
2 years ago
Read 2 more answers
Describe your microsoft word skills that need to be improved upon the most.<br><br>​
Ilya [14]
Shortcuts & Formatting Tricks
Mail Merge
Table of Contents
Compare Documents
Track Changes
Using Synonyms
Presenting Tabular data
Managing Header & Footer
Adding Pictures at right position
Automating tasks through Macros
572 viewsView 4 Upvoters
Related Questions (More Answers Below)
5 0
3 years ago
Other questions:
  • An athlete runs every day for five days. Write a program that computes the total distance and average distance ran by the athlet
    10·1 answer
  • You can use this effect to break a color into a percentage of its full strength.
    13·1 answer
  • What Windows Server 2016 feature implements software-defined storage and is intended to make storage more versatile by making it
    11·1 answer
  • When you park on a hill, think about which way _____.
    6·2 answers
  • What's a sentence with the words trickle and resume in it? they can be in any tense. Thanku​
    5·1 answer
  • What is the formula for determining the number of possible hosts on a network?
    5·1 answer
  • If a file you are opening for appending does not exist, the operating system will detect the missing file and terminate the oper
    14·1 answer
  • Which of the following is true about advertisements?
    15·1 answer
  • a) pencil b) ink bottle c) polygon d) eye 3. Under which of the following can an operating system be classified? b) software c)
    8·1 answer
  • before you start researching fleet management software, your first task is to clearly define the problem. this will help guide y
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!