Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Python division fuckup

Name: KILL YOURSELF 2009-12-10 16:34

Hey /prog,

I'm losing my mind over this. I have a bunch of integers and shit and I just want to get a new god damn variable and it keeps being zero and it's god damn annoying. What's wrong with my talentless "code"? (protip: Mitigation_Division_Comparison is the one that fucks up). I though I might be doing an integer divisor assclownery but checked with a // operator, and anyway this isn't supposed to be a problem in Python 3.x

Have at you

Attack_Power = 2800
Mitigation_Padding = 100
protectionvalue = 3000

Mitigation_Division_Comparison = (Attack_Power + Mitigation_Padding) / (protectionvalue + Mitigation_Padding)

Name: KILL YOURSELF 2009-12-10 17:14

Thanks a bunch, been driving me crazy. But thought Python 3 automagically corrected int/ int to float?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List