Python Forum
tip calculator not displaying proper dollar format
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tip calculator not displaying proper dollar format
#8
(Aug-30-2017, 08:59 AM)Crackity Wrote: I was wondering though if there is a certain situation[s] where one option is preferred over the other?
"{}".format(arg) is for formatting string and printing them. You'll receive a string when using it

whereas round(number,ndigits) is used to round off, it returns float which can further be used for calculations.
Reply


Messages In This Thread
RE: tip calculator not displaying proper dollar format - by hbknjr - Sep-01-2017, 02:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Histogram using pandas dataframe not showing proper output ift38375 1 2,270 Jul-04-2019, 10:43 PM
Last Post: scidam

Forum Jump:

User Panel Messages

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