Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please Help
#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


Messages In This Thread
Please Help - by jackthechampion - Feb-02-2020, 05:40 AM
RE: Please Help - by buran - Feb-02-2020, 05:57 AM
RE: Please Help - by jefsummers - Feb-04-2020, 03:03 AM
Tip Calculator - by jackthechampion - Feb-03-2020, 06:02 AM
RE: Tip Calculator - by sandeep_ganga - Feb-03-2020, 07:51 AM

Forum Jump:

User Panel Messages

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