Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Help... Python 3 program Part II (1 question, 10 points; total 10 points) II. Write the Python program specified here This purpose of this

Please Help... Python 3 program

image text in transcribed

Part II (1 question, 10 points; total 10 points) II. Write the Python program specified here This purpose of this program is to compute the amount of a tip to leave at a restaurant aftera meal. The program 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 pro then prints the original amount of the bill, the calculated tip amount, and the total ant. 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 All your code must be contained within one or more function definitions. The main function is to be called asks the tuser for the amount on the bill and the number of diners at the table whatToPay and works like this: whatloFay) Enter the anount on your billi 57.50 Enter the number of dinerBi 4 Enter the desired tip percentagei Your bill i, 57.5 Your tip is 8.625 Your total due is 66.125 whatoPay Enter the amount on your bill I00 Enter the number of dinersi 6 Your bill iB 100.0 Your tip is 18.0 Your total due is 118.0 whatToPay Enter the anount on your billi 100 Enter the nunber of dinerBi5 Enter the desired tip percentagei Your bill i, 100.0 Your tip is 20.0 Your total due is s 120.0 whatloFay) Enter the anount on your bill 50 Enter the number of diner 3 Enter the desired tip percentagei 10 your bill i 50.0 Your tip is 5.0 Tour total due is 55.0 Write your solution on the following page II coninued. Write the Python functions in the space below

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

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions