I just started learning python and I wrote these three lines of code:
points = 49
total = points / 50 * 500 + 40
print "omg wtf ", total
And I was expecting the result to be something like 530, but instead, no matter what I do, I keep getting 40. I tried initializing the final value 0, discarding the int assignment, I was throwing in parentheses, but nothing works . I am so puzzled ... Can someone help me / tell me what's going on?
source
share