Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please Help
#1
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.
Reply
#2
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.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
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}.')
Reply
#4
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
Reply
#5
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.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020