Question
##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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started