O'Reilly logo

Hello World! Second Edition: Computer Programming for Kids and Other Beginners by Warren Sande and Carter Sande

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 24. Computer Simulations

Have you ever seen a “virtual pet”: those little toys with a small display screen and a few buttons for feeding your pet when it’s hungry, letting it sleep when it’s tired, playing with it when it’s bored, and so on? The virtual pet has some of the same characteristics as a real, live pet. That’s an example of a computer simulation—the virtual pet device is a tiny computer.

In the last chapter, you learned about random events and how to generate them in a program. In a way, that was a kind of simulation. A simulation is where you create a computer model of something from the real world. We created computer models of coins, dice, and decks of cards.

In this chapter, you’ll learn more about using computer programs ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required