Random Number from range What is the best way to get a random number within a certain range?

I made something but I guess there is a better way:

In this example I want to position some elements randomly. This approach works, but I have to define a variable for each value.

{% set randomizr = range(10, 90) %}

{% set randomHeight1 = shuffle(randomizr) | first %}
{% set randomWidth1 = shuffle(randomizr) | first %}

{% set randomHeight2 = shuffle(randomizr) | first %}
{% set randomWidth2 = shuffle(randomizr) | first %}

{% set randomHeight3 = shuffle(randomizr) | first %}
{% set randomWidth3 = shuffle(randomizr) | first %}

{% set randomHeight4 = shuffle(randomizr) | first %}
{% set randomWidth4 = shuffle(randomizr) | first %}

{% set randomHeight5 = shuffle(randomizr) | first %}
{% set randomWidth5 = shuffle(randomizr) | first %}

&lt;div class="sandbox"&gt;
    &lt;div style="left: {{ randomHeight1 }}%; top: {{ randomWidth1 }}%;"&gt;&lt;/div&gt;
    &lt;div style="left: {{ randomHeight2 }}%; top: {{ randomWidth2 }}%;"&gt;&lt;/div&gt;
    &lt;div style="left: {{ randomHeight3 }}%; top: {{ randomWidth3 }}%;"&gt;&lt;/div&gt;
    &lt;div style="left: {{ randomHeight4 }}%; top: {{ randomWidth4 }}%;"&gt;&lt;/div&gt;
    &lt;div style="left: {{ randomHeight5 }}%; top: {{ randomWidth5 }}%;"&gt;&lt;/div&gt;
&lt;/div&gt;


Is this somehow possible without writing each variable manually?
Building off of Brad's answer, you might consider using a for loop to render your markup, instead of setting all of those variables:

{% set range = range(10, 90) %}
{% set totalDivs = 5 %}

&lt;div class="sandbox"&gt;
  {% for i in 1..totalDivs %}
    &lt;div style="left: {{ random(range) }}%; top: {{ random(range) }}%;"&gt;&lt;/div&gt;
  {% endfor %}
&lt;/div&gt;