Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Suppose that a regtaurant charges 1596 of a cugtomer's bill as tips if there more than 5 people in the group. If there are

image text in transcribed
1) Suppose that a regtaurant charges 1596 of a cugtomer's bill as tips if there more than 5 people in the group. If there are less than ar equal to 5 people in the group then the restaurant allows the customer to decide what percentage of the bill hefse wants to pay as tips. Write a Pythan program that - asks the user how much was the bill - how many people in their group - then depending on the number of people asks the user to input the tip percentage (only if number of people is 5 or legs) - finally outputs o the sub-total (the bill amount before tips) - amount to pay as tip o total bill (sub-total + tip) Here are two sample runs of the program. Sample Run 1 (user input has been highlighted): Enter bill amount: 10 Number of people in the group: 6 Sub-total: 10 Tipe: 1.5 Total: 11.5 Sample Run 2 (user input has been highlighted): Enter bill amount: 10 Number of people in the group: 5 What percentage of the bill do you want to pay as tipa: 20 Sub-total: 10 Tipa: 2 Total: 12

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

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions

Question

What are the main objectives of Inventory ?

Answered: 1 week ago

Question

Explain the various inventory management techniques in detail.

Answered: 1 week ago

Question

3. SCC Soft Computer

Answered: 1 week ago

Question

2. KMPG LLP

Answered: 1 week ago

Question

5. Wyeth Pharmaceuticals

Answered: 1 week ago