Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Formatting $
#14
I actually did try to put ROUND, but did not know enough about the language to know where to locate it in the line of code.

What part of the line of code you wrote would I change to get no decimal places?

thanks for the reply.
Happy holidays.

I tried your line; got this
Traceback (most recent call last):
  File "C:/Users/Dennis/PycharmProjects/untitled1/savings.py", line 62, in <module>
    '{}'.format(('$' + str(round(taxableequity))).rjust(10, ' ')), "\t",
TypeError: type str doesn't define __round__ method
I am sorry to keep bothering you -- I appreciate the responses
Reply


Messages In This Thread
Formatting $ - by birdieman - Dec-22-2016, 03:07 PM
RE: Formatting $ - by snippsat - Dec-22-2016, 03:26 PM
RE: Formatting $ - by birdieman - Dec-22-2016, 03:32 PM
RE: Formatting $ - by snippsat - Dec-22-2016, 03:46 PM
RE: Formatting $ - by birdieman - Dec-22-2016, 04:00 PM
RE: Formatting $ - by wavic - Dec-22-2016, 04:43 PM
RE: Formatting $ - by birdieman - Dec-22-2016, 05:08 PM
RE: Formatting $ - by wavic - Dec-22-2016, 05:21 PM
RE: Formatting $ - by snippsat - Dec-22-2016, 06:22 PM
RE: Formatting $ - by wavic - Dec-25-2016, 06:25 AM
RE: Formatting $ - by birdieman - Dec-25-2016, 01:01 PM
RE: Formatting $ - by wavic - Dec-25-2016, 01:15 PM
RE: Formatting $ - by birdieman - Dec-25-2016, 03:55 PM
RE: Formatting $ - by wavic - Dec-25-2016, 04:37 PM
RE: Formatting $ - by birdieman - Dec-25-2016, 05:43 PM
RE: Formatting $ - by wavic - Dec-25-2016, 06:37 PM
RE: Formatting $ - by birdieman - Dec-25-2016, 08:51 PM
RE: Formatting $ - by wavic - Dec-25-2016, 10:14 PM
Formatting $ - by birdieman - Dec-24-2016, 05:25 PM

Forum Jump:

User Panel Messages

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