Description
Give a phython program
Unformatted Attachment Preview
Write a program that prompts user to enter the bill amount. The program
calculates 18%, 20% and 25% gratuity amount and displays the amount with 2
decimal places.
Output each floating-point value with two digits after the decimal point, which
can be achieved as follows:
print(f’Bill amount: ${your_value:.2f}’)
Here are sample program run. Your program output message should be
similar to below with no space between the “$” and number. Use the f-string
as guide. Make sure use other inputs to verify the correctness of the program.
Enter bill amount: 35.30
Bill amount: $35.30
18% gratuity: $6.35
20% gratuity: $7.06
25% gratuity: $8.82
There is no auto grade for this lab. You need to test your code for correctness
before turning it in. Include at least three test cases, ie, run the program at
least three times, that use different inputs than the above examples to verify
your program is working correctly.
Follow this instruction on how to setup EdStem to write and test program, and
submit the assignment. The submission includes executing and testing of the
program embedded as comment in the code.
Note: You must name the Python file gratuity.py. No other name will be
accepted.
Purchase answer to see full
attachment