# Odd Automatic Rounding Issue with Python Script

**URL:** <https://forum.dynamobim.com/t/odd-automatic-rounding-issue-with-python-script/37417>\
**Category:** DesignScript\
**Tags:** python, dynamo\
**Created:** [June 20, 2019, 1:22pm UTC](https://forum.dynamobim.com/t/odd-automatic-rounding-issue-with-python-script/37417 "2019-06-20T13:22:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![engelmanblaze](https://avatars.discourse-cdn.com/v4/letter/e/90db22/32.png) [@engelmanblaze](https://forum.dynamobim.com/u/engelmanblaze)\
**Post date:** [June 20, 2019, 1:22pm UTC](https://forum.dynamobim.com/t/odd-automatic-rounding-issue-with-python-script/37417/1 "2019-06-20T13:22:14Z")

</div>

Hello,

I have come across an odd problem with dynamo’s python.  
The problem is best displayed in line 19, if I divide 7 by 2 it gives an answer of 3, not 3.5

 ![Dynamo_Question](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/b/4b6b7213fbcd7b5b9e2f58c09f8f35cb37ecb90e.png)

This problem is in other parts of the script as well.  
Any help or suggestions are appreciated. Thanks

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 20, 2019, 1:38pm UTC](https://forum.dynamobim.com/t/odd-automatic-rounding-issue-with-python-script/37417/2 "2019-06-20T13:38:31Z")

</div>

I’ve never noticed this before but apparently Python won’t convert types that way. The problem is you’re telling it to divide an integer by an integer and is therefore returning an integer. Change at least one of the values to a double and it will return a double.
