Use of Random #668
PaulLBos
started this conversation in
Show and tell
Replies: 2 comments 1 reply
-
value = urandom.randrange(0,100,1)FYI, this can be written more simply as: value = urandom.randrange(100)since 0 is the default start value and 1 is the default step. We should probably add some more examples and explanation in the docs: https://docs.pybricks.com/en/stable/micropython/urandom.html |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This is not working in move hub |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was struggling to make random work. Eventually came up with this Hope I helps someone else
Beta Was this translation helpful? Give feedback.
All reactions