Answer :
Answer:
check_amount = float(input("Please enter check amount: "))
print('Base cost: $ {}'.format(check_amount))
tax = (7/100)*check_amount
print('tax at 7% is $ {}'.format(tax))
tipStingy = (10/100)*check_amount
tipRegular = (15/100)*check_amount
tipGenerous= (20/100)*check_amount
print('Tip for stingy customers (10 %): ${}'.format(tipStingy))
print('Tip for Regular customers (15 %): ${}'.format(tipRegular))
print('Tip for generous customers (20 %): ${}'.format(tipGenerous))
print('Total with tax and tip for regular customers: ${}'.format(check_amount+tax+tipRegular))
Explanation:
Find the screenshot of code output attached.
The variable check_amout is received with the input function and converted to a floating point number by casting to float
All the other variables are computed as percentages of this variable
Python's .format method is used with the print function for output as required
