Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

##Python -Calculator ##Compute the price of a meal as follows by asking for the price of child and adult meals, the number of each, and

##Python -Calculator

##Compute the price of a meal as follows by asking for the price of child and adult meals, the number of each, and then the sales tax rate.

##Use these values to determine the total price of the meal.

##Then, ask for the payment amount and compute the amount of change to give back to the customer.

##Keep in mind that some of these values are floating point numbers

##(they can have decimals) and some of them are integers (whole numbers).

## Determine the meal's subtotal (before adding sales tax) by multiplying the number of children by the price of their meal,

##and multiplying the number of adults by the price of their meal

##and adding those two values together.

## DISPLAY subtotal

## Compute and display the sales tax,

## by multiplying the subtotal by the sales tax rate divided by 100.

## Ask the customer for the payment amount (floating point)

## Compute and display the change

##USER INPUTS

## What is the price of a child's meal? $12.25

## What is the price of an adult's meal? $16.99

## How many children are there? 2

## How many adults are there? 2

## What is the sales tax rate? 5.6

## Subtotal: $58.48

## Sales Tax: $3.27

## Total: $61.75

## Tip: 20%

## What is the payment amount? $74.00 (If card)

## What is the payment amount? $80.00 (If cash)

## What is your form of payment? Card/Cash

## If a card

## Change: $0.00

## If Cash: $80.00

## Change: $6.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2019 Wurzburg Germany September 16 20 2019 Proceedings Part 2 Lnai 11907

Authors: Ulf Brefeld ,Elisa Fromont ,Andreas Hotho ,Arno Knobbe ,Marloes Maathuis ,Celine Robardet

1st Edition

3030461467, 978-3030461461

More Books

Students also viewed these Databases questions

Question

4. Support and enliven your speech with effective research

Answered: 1 week ago

Question

3. Choose an appropriate topic and develop it

Answered: 1 week ago