Project 2
Big Numbers
When you installed Ruby, a number of tools were placed on your computer. You’ll use many of these tools time and time again as you learn to program. In this project, I show you how you can use a combination of your terminal program and Interactive Ruby to do quick experiments that let you try new things with Ruby.
You’ll start at the very beginning and explore some of the most basic things you might ask a computer to do by exploring numbers, simple math, and storing results in the computer’s memory using variables.
You probably didn’t think Ruby could be used as a calculator for gigantic numbers, did you?
Starting Interactive Ruby
This project is completed entirely within your terminal (or console) program and uses Interactive Ruby (known as IRB or irb).
To get ready for this project, locate your terminal program (on the Mac) or the console with Ruby shortcut (on Windows). When that’s running, everything else is the same.
Get Ruby For Kids For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.