15.04.2018 Views

programming-for-dummies

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Teaching Languages 61<br />

Book I<br />

Chapter 3<br />

Types of<br />

Programming<br />

Languages<br />

Figure 3-3:<br />

An Alice<br />

program<br />

creates an<br />

animated<br />

character<br />

on-screen<br />

and moves it<br />

around.<br />

Lego Mindstorms<br />

Kids love building things with Lego building bricks, so to encourage kids to<br />

build actual working robots, Lego has released their Lego robot-building kit,<br />

Mindstorms NXT. Not only can you build a working robot with Lego bricks, but<br />

you can also program it using the Lego NXT-G <strong>programming</strong> language.<br />

To write a program in NXT-G, you don’t have to type a thing. Instead, you<br />

create a program by arranging icons that represent different type of actions<br />

your robot can do, such as move <strong>for</strong>ward or respond to a light. After<br />

writing your program on your computer, you load that program into your<br />

Lego robot and watch it go.<br />

By using Lego Mindstorms NXT, anyone can figure out both <strong>programming</strong><br />

skills and robot-making skills. Unlike KPL, Logo, or Alice, Lego Mindstorms<br />

NXT lets you see your working program in action as a walking, rolling, or<br />

crawling Lego robot.<br />

Programming a killer robot<br />

Studying how to program by controlling a Lego robot can be fun, but to combine<br />

the thrill of controlling a robot with the joy of playing a video game,<br />

computer scientists have also created games that let you write a simple<br />

program <strong>for</strong> controlling a battling robot, as shown in Figure 3-4.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!