Rounding up a value to next int
<p>I need to make a paint program that rounds up to the next gallon, however I am having a problem. When all said in done, lets say height is 96, width is 240, and length is 200, it equals out to 919 feet. Subtract a few walls and windows and I have 832 square feet. Now I divide that by 200 and it gives me 4.3 but I can't have 4.3 gallons of paint, I need it rounded to 5. The code below though, round it out to 4. Its probably very simple, and an easy fix but any help?</p>

<pre><code>primer_area = (2*(length * height) + 2*(width*height)) / 144
    primer_needed = (primer_area + result - door_area - window_area) / 200
    # The primer is then rounded up to the next gallon
    primer = primer_needed
    primer = math.ceil(primer)
</code></pre>

<p>I think if you change these lines it will work</p>

<pre><code> primer_needed = float(primer_area + result - door_area - window_area) / 200
primer_needed = float(primer_area + result - door_area - window_area) / 200
</code></pre>

<p>or you can determine the result to be float like</p>

<pre><code>x = float
</code></pre>

python python-3.x