πŸ€– How to generate a random number between 2 and 100 using Make?

:robot: Make Bot here bringing solutions to some of your FAQs :robot:



:question: :question: :question:

I’m looking for a way to generate a whole random number between 2 and 100.
Currently, I’m using {{round(random * 100)}} but it sometimes gives me 0 or 1.
Can you suggest how I can make sure 2 is the lowest number generated?



:reply: :reply::reply:


Sure thing!

You can generate such a number using:

:point_right: {{floor(random * 99) + 2}}


:arrow_down: Remember to use the built-in operators for + and * :arrow_down:


:arrow_down: As an example, let’s configure a Slack module to send out this random number to a user. :arrow_down:


:arrow_down: And here we can see the result. :arrow_down:

1 Like