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
stiv31 [10]
2 years ago
12

Write a program to calculate how much to tip a waiter person based on the quality of service. The script file should ask for the

amount of the check and whether the service was good, fair or poor. If the service was good, the tip should be 20%. If the service was fair, the tip should be 15%. If the service was poor, the tip should be 5%. The program should display the tip and the total of the check including the tip.
Computers and Technology
1 answer:
IgorC [24]2 years ago
5 0

Answer:

Since Python is a scripting language, here is code in python.

#prompt user to give check

amount=float(input("Please Enter the check:"))

#prompt user to give service

service=input("Please Enter the service (good, fair or poor):")

# calculate tip on the basis of service

if service =="good":

   tip=amount*0.2

elif service=="fair":

   tip=amount*0.15

elif service=="poor":

   tip=amount*0.05

#calculate total

total=amount+tip

#print tip

print("tip is equal to : {} ".format(tip))

#print total

print("total of the check is : {} ".format(total))

Explanation:

Prompt user to give check and service input.After taking the input from user, based on the service tip will be calculated. if service is "good" then tip will be 20% of the check, tip will be 15% if service is "fair" and tip will be 5% if service is "poor".

Output:

Please Enter the check:125                                                                                                

Please Enter the service (good, fair or poor):good                                                                        

tip is equal to : 25.0                                                                                                    

total of the check is : 150.0

You might be interested in
Define function print_popcorn_time() with parameter bag_ounces. If bag_ounces is less than 3, print "Too small". If greater than
Gnoma [55]

Answer:

public static void print_popcorn_time(int bag_ounces){

       if(bag_ounces<3){

           System.out.println("Too Small");

       }

       else if(bag_ounces>10){

           System.out.println("Too Large");

       }

       else{

           bag_ounces*=6;

           System.out.println(bag_ounces+" seconds");

       }

   }

Explanation:

Using Java prograamming Language.

The Method (function) print_popcorn_time is defined to accept a single parameter of type int

Using if...else if ....else statements it prints the expected output given in the question

A complete java program calling the method is given below

public class num6 {

   public static void main(String[] args) {

       int bagOunces = 7;

       print_popcorn_time(bagOunces);

   }

   public static void print_popcorn_time(int bag_ounces){

       if(bag_ounces<3){

           System.out.println("Too Small");

       }

       else if(bag_ounces>10){

           System.out.println("Too Large");

       }

       else{

           bag_ounces*=6;

           System.out.println(bag_ounces+" seconds");

       }

   }

}

3 0
3 years ago
______is a multimodal application software platform. the centrealized and shared database system ties the entire organization to
m_a_m_a [10]

Answer:

ERP.  

Explanation:

Enterprise Resource Planning Is the software platform for bidirectional applications. The main objective of  ERP it shared the database system and connects the enterprise as a whole so that data can be reached the once and made accessible to all users.

The main advantage of Enterprise Resource Planning is that Enterprise cycle parallelization or optimization it also the boost performance of the organization and saving the time.

3 0
3 years ago
Mikayla is researching copyright information for images found on a website. She needs to figure out the legal name of the compan
Pie

Answer:

C. Footer

Explanation:

A footer is typically found at the bottom of all web pages and it comprises of information such as disclaimers, copyright, legal which are displayed visibly for all visitors to see.

Generally, a website footer is the direct opposite of a website header in relation to positioning or location; a footer is always found at the bottom while a header is always found at the top of a web page.

Since Mikayla is researching copyright information for the images found on a website, she should access the website footer because it primarily provides information about the legal name of the company that owns the website and information about what country they're located in, as well as links to other relevant resources such as call to action, maps, contact forms, newsletter signup etc.

3 0
2 years ago
REEEEEEE I STILL NEED MORE AESTHETIC USERNAMES TO GO OFF OF PWEASE HELP IMA HAVE A PANIC ATTACK!!!... next post ima do a vote :&
aev [14]

StrawberryTeaa (could be any fruit: blueberry, peach, etc)

potatoxchip

pastelsquid

SquishyPeach

GummiBear

ElegantFlaws (could add an e and remove the s: EleganteFlaw)

hunnie_b (or honee, honnie, hunni, etc)

agonyisheree

It's cool if you don't like these. I had trouble when I changed my user too. But you'll find your perfect username eventually. :)

7 0
2 years ago
11.How would you characterize the relative range of paths forecasted by the various computer models on August 25
larisa86 [58]

Answer:

Following are the solution to this question:

Explanation:

There is some difference between both the path expected by different computer simulations on 25 August. There is also some variance between 50 km to 500 km in the predicted route but the path is also unique in each model evaluation. It might be because any and every possible situation is repeated by the computer program. Many simulations will focus mostly on variations of strain, one might focus on the temperature variation, or one might concentrate on certain variables. But each model suggests all and every parameter which is inserted during a very photographer's encoding. There are therefore several possibilities of variability in forecasting the Hurricane's course. Here and some forecasts have shown that hurricanes would pass through Florida fully, and also some models have shown that hurricanes would pass thru the Gulf Coast, accompanied by the areas of Mississippi or Louisiana. This is the real difference in the direction of these models.

3 0
2 years ago
Other questions:
  • Where do scanned documents go in windows 10?
    11·1 answer
  • Sarah believes that thanks to the ability of science and technology to create progress problems will be solved and life will imp
    11·1 answer
  • In 2-3 paragraphs, identify at least two ways technology and innovation have affected global economic competition. Provide a spe
    5·1 answer
  • The purpose of a memo is to communicate directions, advice , or information true or false
    8·2 answers
  • Given positive integer numinsects, write a while loop that prints that number doubled without reaching 100. follow each number w
    10·1 answer
  • opy the code below into the coderunner window. Debug the code so that it outputs the verses correctly. a = input("Enter an anima
    14·1 answer
  • Hey how are yall today?
    12·2 answers
  • The interprets the data while it is in RAM​
    8·1 answer
  • Explain the reason why vector graphics are highly recommended for logo​
    5·1 answer
  • Anyone who do bug bounty hunt ?​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!