Skip to Main Content
The Art of LEGO MINDSTORMS NXT-G Programming
book

The Art of LEGO MINDSTORMS NXT-G Programming

by Terry Griffin
August 2010
Intermediate to advanced content levelIntermediate to advanced
288 pages
13h 21m
English
No Starch Press
Content preview from The Art of LEGO MINDSTORMS NXT-G Programming

the random block

Now that you know how numbers work in NXT-G, you can move on to some of the other math-related blocks, starting with the Random block. This block is found in the Data group on the Complete Palette, as shown in Figure 14-12. Figure 14-13 shows how the block looks in a program.

The Random block on the Complete Palette

Figure 14-12. The Random block on the Complete Palette

The Random block

Figure 14-13. The Random block

A die is used for the picture on the Random block because in many games a die (or two or more dice) is used to generate a random number. Rolling a standard die will give you a ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Art of LEGO MINDSTORMS EV3 Programming (Full Color)

The Art of LEGO MINDSTORMS EV3 Programming (Full Color)

Terry Griffin

Publisher Resources

ISBN: 9781593272180Errata