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
lbvjy [14]
3 years ago
15

Write a program that calculates the total amount of a meal purchased at a restaurant by a customer. The program should ask the u

ser to input the charges of the food, then calculate the amounts of a 18% tip and 7 % sales tax. Display each of these amounts and total charges.
Computers and Technology
1 answer:
Illusion [34]3 years ago
7 0

Answer:

Python script is given below

Explanation:

charge = float(input('Enter the amount you were charged. $'))

#setting the formula for tip and tax

tip = charge*.18

tax = charge*.07

#printing the values

print('Charge for the food: %.2f' % charge)

print('The tip amount: %.2f' % tip)

print('Tax amount: %.2f' % tax)

print('Total amount: %.2f' % (charge+tip+tax))

You might be interested in
Why is manual coding the best way to learn HTML?
Stels [109]

Answer:

It helps to put the code in to your working memory and you will have a greater ability to problem solve.

Explanation:

If your just a beginner, then writing the code out your self will help you learn what each line means. Also, you will see the effects that each line has. Of course, this is really dependent on how much code you've written before and how much code your dealing with.

5 0
3 years ago
The first tools that analyzed and extracted data from floppy disks and hard disks were MS-DOS tools for ____ PC file systems.
netineya [11]

<u>The first tools that analyzed and extracted data from floppy disks and hard disks were MS-DOS tools for </u><u>IBM</u><u> PC file systems</u>. A file system is a structured representation of data and a set of metadata describing this data. The file system of the IBM supports stream input/output and storage management, providing a structure over all information stored in the system. A floppy disk consists of a thin plastic disk coated with magnetic material (it was designed by IBM in the early 1970s). A hard disk is fixed on the system unit. It is made up of several circular disks called platters. MS-DOS (Microsoft Disk Operating System) is a licensed operating system for use on microcomputers from various manufacturers.

6 0
3 years ago
Write the Number class that can be used to test if the number is odd, even, and perfect. A perfect number is any number that is
egoroff_w [7]

Answer:

Explanation:

The following code is written in Python. It creates a class that takes in one ArrayList parameter and loops through it and calls two functions that check if the numbers are Perfect, Odd, or Even. Then it goes counting each and printing the final results to the screen.

class NumberAnalyzer:

   def __init__(self, myArray):

       perfect = 0

       odd = 0

       even = 0

       for element in myArray:

           if self.isPerfect(element) == True:

               perfect += 1

           else:

               if self.isEven(element) == True:

                   even += 1

               else:

                   odd += 1

       print("# of Perfect elements: " + str(perfect))

       print("# of Even elements: " + str(even))

       print("# of Odd elements: " + str(odd))

   def isPerfect(self, number):

       sum = 1

       i = 2

       while i * i <= number:

           if number % i == 0:

               sum = sum + i + number / i

           i += 1

       if number == sum:

           return True

       else:

           return False

   def isEven(self, number):

       if (number % 2) == 0:

           return True

       else:

           return False

6 0
2 years ago
What is the depth of the following tree?
atroni [7]

Answer:

the answer for the question is D.

4 0
2 years ago
What is the best website to get a iphone
sveticcg [70]
Generally I'd recommend not buying one online, tends to be cheaper from a shop - and better used, although their are some risks with 2nd hand devices, I think the big price cut it worth it. 

If you did want to buy online, maybe Amazon or Ebay?
7 0
3 years ago
Read 2 more answers
Other questions:
  • What's the ASCII code for boy ?
    15·1 answer
  • Describe mobile computing
    7·1 answer
  • Describe the effect of a pull up resistor
    7·1 answer
  • What does snap do need the answer now
    10·2 answers
  • To make IPv4 addresses a little easier for human beings to understand, the 32-bit binary addresses are represented by dotted dec
    9·1 answer
  • An Administrator wants to have a thank you email sent after the form on the "Request a Demo" landing page is submitted. Where ca
    12·1 answer
  • The browser on which you are viewing web pages is called the
    13·1 answer
  • A user finished working on a computer in the lab. What should the user do so
    15·1 answer
  • Question 1 (1 point)
    9·2 answers
  • Describe your ideas for a keyboarding game that would help someone improve their skills.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!