Nov-29-2017, 09:21 PM
How do I make 24/48 to equal 0.5?
My program says that it equals 0. However, if I write it as 24.0/48 then I get the correct result.
How do I change this so that my variables will have more precision? I want to write y as 24. I don't want to write it at 24.0
My program says that it equals 0. However, if I write it as 24.0/48 then I get the correct result.
How do I change this so that my variables will have more precision? I want to write y as 24. I don't want to write it at 24.0
import math from PIL import Image import time y = 24.0 x = 48 z = y / x print z a = 24 b = 48 c = a / b print c