Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8571987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:54:15+00:00 2026-06-11T18:54:15+00:00

Possible Duplicate: Python 3.2.3 programming…Almost had it working x = float(input(What is/was the cost

  • 0

Possible Duplicate:
Python 3.2.3 programming…Almost had it working

x = float(input("What is/was the cost of the meal?"))
y = float(input("What is/was the sales tax?"))
z = float(input("What percentage tip would you like to leave?"))

print ("Original Food Charge: ${}"
.format(x)))
print ("Sales Tax: ${}"
.format((y/100)*x)))
print ("Tip: ${}"
.format(x*(z/100)))
print ("Total Charge For Food: ${}"
.format(x+((y/100)*x)+((z/100)*x)))

output error:

line 10, in
Syntax Error: .format(x))):line 1015

Someone report that this worked in their earlier version of python (v2.6 I think). I’m using the later 3.2.3 and racking my darn brain as to why this is not working to this version. It makes sense to me someone please ENLIGHTEN me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:54:16+00:00Added an answer on June 11, 2026 at 6:54 pm

    There is a parentheses missing after .format(x*(z/100)) that belongs to the preceding print.

    It should be:

    print ("Tip: ${}".format(x*(z/100)))
    

    UPDATE: Not sure if you got it working or not yet, here is the complete code after fixing your unbalanced parentheses…

    x = float(input("What is/was the cost of the meal?"))
    y = float(input("What is/was the sales tax?"))
    z = float(input("What percentage tip would you like to leave?"))
    
    print ("Original Food Charge: ${}"
    .format(x))
    print ("Sales Tax: ${}"
    .format((y/100)*x))
    print ("Tip: ${}"
    .format(x*(z/100)))
    print ("Total Charge For Food: ${}"
    .format(x+((y/100)*x)+((z/100)*x)))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Why functional languages? I began programming with C/C++, VB, and eventually Python
Possible Duplicate: Python List vs. Array - when to use? I'm working on a
Possible Duplicate: Python float - str - float weirdness Python float division does not
Possible Duplicate: python dict.add_by_value(dict_2) ? My input is two dictionaries that have string keys
Possible Duplicate: Python float - str - float weirdness In python, 2/5.0 or 2/float(5)
Possible Duplicate: Rolling or sliding window iterator in Python I'm new to programming and
Possible Duplicate: Python : how to append new elements in a list of list?
Possible Duplicate: Python: What is the best way to check if a list is
Possible Duplicate: Python: Get object by id Typically when you see the string representation
Possible Duplicate: Python: Behaviour of increment and decrement operators >>> a=2 >>> ++a 2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.