# Create random numbers in python

**URL:** <https://forum.dynamobim.com/t/create-random-numbers-in-python/31584>\
**Category:** Revit\
**Tags:** python\
**Created:** [February 2, 2019, 3:21pm UTC](https://forum.dynamobim.com/t/create-random-numbers-in-python/31584 "2019-02-02T15:21:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![SeanP](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/seanp/32/42560_2.png) [@SeanP](https://forum.dynamobim.com/u/SeanP)\
**Post date:** [February 2, 2019, 4:29pm UTC](https://forum.dynamobim.com/t/create-random-numbers-in-python/31584/2 "2019-02-02T16:29:29Z")

</div>

I think this post would guide you to random numbers.

> [@Exception in random numbering node](https://forum.dynamobim.com/t/exception-in-random-numbering-node/16624/3):
>
> So this code block takes four inputs - a minimum value, a maximum value, a minimum void, and a maximum void. It then crates a random list just like the Math.Random node. It then finds the midpoint of the void (half way between the minimum void and the maximum void). It then tests if any of the resulting numbers are between the minimum void and the midpoint of the void, and generates a new random number between the minimum value and the minimum void, and replaces the initial input with that. Num…

---

_[View the full topic](https://forum.dynamobim.com/t/create-random-numbers-in-python/31584)._
