Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: If a decimal is 0 how do I make it not show?
Post: RE: If a decimal is 0 how do I make it not show?

(Feb-08-2019, 12:57 AM)micseydel Wrote: Ah, ok, yeah that's a little different. You can try using the modulo operator (e.g. your_num % 1 == 0). Ok, thanks.
GamingDay General Coding Help 4 2,686 Feb-08-2019, 01:00 AM
    Thread: If a decimal is 0 how do I make it not show?
Post: RE: If a decimal is 0 how do I make it not show?

(Feb-08-2019, 12:25 AM)micseydel Wrote: You probably just want to call int() on the number. I only want them to be an integer when they have the decimal "0". How do I do that?
GamingDay General Coding Help 4 2,686 Feb-08-2019, 12:44 AM
    Thread: If a decimal is 0 how do I make it not show?
Post: If a decimal is 0 how do I make it not show?

I'm new and only 30 minutes into Python. I'm trying to calculate something using randomly generated numbers and when I want to round it to 1 decimal I use number2 = round(number1, 1)But sometimes I'll...
GamingDay General Coding Help 4 2,686 Feb-08-2019, 12:22 AM

User Panel Messages

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