Python Forum
Mathematical Operators in String
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mathematical Operators in String
#1
Hey this is a very simple question, how do I use mathematical numbers in text such as 1,000.00 and 9,000.00.
For example:
x=float(1,000.00)
y=float(19,000.00)
print(x*y)
Error:
Traceback (most recent call last): File "C:\Users\aabha\OneDrive\Desktop\py4e\rough.py", line 1, in <module> x=float(1,000.00) TypeError: float expected at most 1 arguments, got 2
Reply


Messages In This Thread
Mathematical Operators in String - by AgileAVS - Mar-04-2020, 12:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  plotting based on the results of mathematical formulas Timur 1 351 Feb-08-2024, 07:22 PM
Last Post: Gribouillis
  Use of if - and operators Pedro_Castillo 1 500 Oct-24-2023, 08:33 AM
Last Post: deanhystad
  Taking Mathematical Expressions from Strings quest 2 716 Jul-02-2023, 01:38 PM
Last Post: Pedroski55
  Mixing Boolean and comparison operators Mark17 3 1,422 Jul-11-2022, 02:20 AM
Last Post: perfringo
  Magic Method Arithmetic Operators ClownPrinceOfCrime 3 2,329 Jan-10-2021, 03:24 PM
Last Post: ndc85430
  About mathematical equations seyidcemkarakas 3 2,059 Oct-04-2020, 01:21 PM
Last Post: Gribouillis
  Recognising mathematical expressions from word and pdf file Preeti15 0 1,802 Aug-19-2020, 09:06 AM
Last Post: Preeti15
  Mathematical Conversion Scripts for Weather Station Mickey53usa 11 4,646 Jun-24-2020, 03:14 AM
Last Post: buran
  Class and Operators in Python rsherry8 1 1,997 May-27-2020, 07:09 PM
Last Post: buran
  Trying Comparison Operators PythonGainz 3 2,729 Mar-28-2020, 10:46 AM
Last Post: PythonGainz

Forum Jump:

User Panel Messages

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