Tip to leave at a restaurant after a meal

Assignment Help Basic Computer Science
Reference no: EM131716452

Can you explain to me the layout as to how to write a function?

In this problem: This purpose of this program is to compute the amount of a tip to leave at a restaurant after a meal. The program asks the user for the amount on the bill and the number of diners at the table.If the number of diners is six or more, the default tip percentage will be 18%. If the number of diners is less than six, the program will ask the user for the desired tip percentage. The program then prints the original amount of the bill, the calculated tip amount, and the total amount. You may assume that all user inputs are valid. You do not have to worry about printing only two digits after a decimal point. You do not have to comment your program.

I know I begin with def whatToPay():

However, I don't understand how I should write the rest. The function would be amount = bill * tip. How should I define my parameters? Or even, what are my parameters? Is it bill, tip, and diners? I am completely lost.

Reference no: EM131716452

Questions Cloud

Which compound is being oxidized : In the redox reaction depicted in Figure, which compound is being oxidized, and how did you determine this
Except february which has twenty-eight : The following rhyme helps us remember how many days there are in any given month:
Describe any characteristics that you would need to develop : Describe any characteristics that you would need to develop in working on this case and why this would be important.
What other influences are present in their approach : Several countries does not offer free schooling to children. For example, most schools in the Philippines does not receive any government funds.
Tip to leave at a restaurant after a meal : In this problem: This purpose of this program is to compute the amount of a tip to leave at a restaurant after a meal. The program asks the user
Explain why the members of the group : Explain why the members of the group you choose is at risk for TBI
Describing test cases based on ontologies : Describing test cases based on ontologies - Test case abstraction after execution - Test case reuse models and frameworks
Examine the actions you will take to address : Identify the main resources that you will need in each of the following areas in order to implement the plan - economic, social / community, political.
Discuss some experiences of the later years : Discuss some experiences of the later years that may alter an older person's self-concept and may negatively influence their self-esteem

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd