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

  • SEARCH
  • Home
  • 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 8598357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:07:56+00:00 2026-06-12T01:07:56+00:00

print (What is/was your original purchase price?) x = input valx=float(x) print (Amount of

  • 0
print ("What is/was your original purchase price?")
x = input
valx=float(x)

print ("Amount of original purchase: ${}"
   .format(valx))
print ("State sales tax on original purchase: ${}"
   .format(valx*.04))
print ("County sales tax on original purchase: ${}"
   .format(valx*.02))
print ("Total sales tax (county and state): ${}"
   .format(valx*.06))
print ("Total of the sale (original purchase and total sales tax): ${}"
   .format(valx*.06))

this makes sense to me and I’ve used this method in the past, however it doesn’t work now.

Output error: line 9, in <module>builtins.TypeError: float() argument must be a string or a number

basically my goal is to display the amount of the original purchase, the amount of the state sales tax(4%) on the original purchase, the amount of the county sales tax(2%) original purchase, the total sales tax (county tax plus state tax), and final the total of the sale (which is the sum of the amount of the original purchase plus the total sales tax).

  • 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-12T01:07:57+00:00Added an answer on June 12, 2026 at 1:07 am

    The way to retrieve input from the command line would be this:

    valx=float(input("What is/was your original purchase price?"))
    

    input is a string, and you convert it to a float by wrapping that call. You then don’t need the extra variable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATED: This Code Works: # North Carolina Sales Tax Estimator # Estimates the Amount
What is the most elegant way, in your opinion, to print to std::cout using
Thanks for all your help - see blow original question, and my edit following
I'd like your help with understand what can be an input from a user
for ($rank=0; $rank<100; $rank++) { printf(Your rank: %d%s, $rank, $suffix); } Does there exist
a point of architectural style that I'd like your opinion on please: My ORM
Could someone point me in the right direction on how you get your Page
I have external html5 canvas that you can paint on some lines using your
I was going through this article : http://www.ajaxline.com/32-tips-to-speed-up-your-mysql-queries at point#4 , it states :
Print all combinations of a number N, as a sum of positive integers? They

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.