Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
whole number and fraction
#9
What about divmod()?

>>> a=1.5
>>> divmod(a,1)
(1.0, 0.5)
>>> a=3.14159
>>> divmod(a,1)
(3.0, 0.14158999999999988)
Reply


Messages In This Thread
whole number and fraction - by Skaperen - Mar-15-2019, 06:59 PM
RE: whole number and fraction - by ichabod801 - Mar-15-2019, 07:10 PM
RE: whole number and fraction - by Skaperen - Mar-15-2019, 10:51 PM
RE: whole number and fraction - by ichabod801 - Mar-16-2019, 02:27 AM
RE: whole number and fraction - by samsonite - Mar-16-2019, 08:48 AM
RE: whole number and fraction - by farhan275 - Mar-16-2019, 12:00 AM
RE: whole number and fraction - by ichabod801 - Mar-16-2019, 03:14 PM
RE: whole number and fraction - by samsonite - Mar-16-2019, 04:59 PM
RE: whole number and fraction - by casevh - Mar-16-2019, 07:03 PM
RE: whole number and fraction - by Skaperen - Mar-16-2019, 07:08 PM
RE: whole number and fraction - by DeaD_EyE - Mar-17-2019, 06:40 AM
RE: whole number and fraction - by Skaperen - Mar-17-2019, 11:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  method to remove zero digits from fraction in decimal Skaperen 17 2,906 Oct-23-2022, 04:02 AM
Last Post: Skaperen
  Fraction Calculation with Limitations TINMAN01 13 5,505 Dec-22-2020, 04:45 AM
Last Post: bowlofred
  fraction module: can you stop the reducing? qmfoam 1 2,459 Oct-10-2020, 06:10 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

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