Python Forum

Full Version: Please Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a homework assignment I was hopeing someone could help me so I don't fail my class. This is the assignment if someone could just give me the coding for it or help me out I'd really appreciate it and then I'll know that information for next time d:

Create a tip calculator program. This program prompts for the server's name, the amount of the check as a floating point number and the tip percent as a whole number. It then calculates the tip total and the total amount (amount of the check plus the tip amount). The program clears the screen and then displays an ascii word art title along with the server name, check amount, tip percent, tip total and total amount in the output.
Welcome to the forum. We are glad to help, but we are not big on writing homework for other people. You need to show effort, post your code in python tags, full traceback (if any) - in error tags and ask specific questions.
So this is what I need to do


Create a tip calculator program. This program prompts for the server's name, the amount of the check as a floating point number and the tip percent as a whole number. It then calculates the tip total and the total amount (amount of the check plus the tip amount). The program clears the screen and then displays an ascii word art title along with the server name, check amount, tip percent, tip total and total amount in the output.




my issue is I am not able to get it to calculate the tip perecent, check total, and tip total I was able to get the name in and the total of how much i'd have to pay was hopeing someone could help me out here this is as far as I have gotten so far

first_name = input ("What is the servers name? ")
price_meal = float(input("What is the check amount? "))
tip = float(input("Tip Percent? "))
price_meal += price_meal + tip
print(f'Your total cost is {price_meal:.2f}.')
try this to see if helps,

first_name = input ("What is the servers name? ")
price_meal = float(input("What is the check amount? "))
tip_p = float(input("Tip Percent? "))
tip=price_meal*(tip_p/100)
price_meal = price_meal + tip
print(f'Your total cost is {price_meal:.2f}.')
Output:
python test1.py What is the servers name? abc What is the check amount? 20 Tip Percent? 50 Your total cost is 30.00.
Best Regards,
Sandeep

GANGA SANDEEP KUMAR
Follow the directions explicitly. Ganga gave you the calculations. Now, Google Python clear screen to see how to clear the screen. Then you will need to create the ascii word art. That didnt drop from the sky, you must have had some instruction on that in class or other assignments. Then print the word art, server name, tip, basically just follow the instructions.