Children

Ruby Wizardry: An Introduction to Programming for Kids

Ruby Wizardry: An Introduction to Programming for Kids

Eric Weinstein

Language: English

Pages: 352

ISBN: 1593275668

Format: PDF / Kindle (mobi) / ePub


The Ruby programming language is perfect for beginners: easy to learn, powerful, and fun to use! But wouldn't it be more fun if you were learning with the help of some wizards and dragons?

Ruby Wizardry is a playful, illustrated tale that will teach you how to program in Ruby by taking you on a fantastical journey. As you follow the adventures of young heroes Ruben and Scarlet, you'll learn real programming skills, like how to:

  • Use fundamental concepts like variables, symbols, arrays, and strings
  • Work with Ruby hashes to create a programmable breakfast menu
  • Control program flow with loops and conditionals to help the Royal Plumber
  • Test your wild and crazy ideas in IRB and save your programs as scripts
  • Create a class of mini-wizards, each with their own superpower!
  • Organize and reuse your code with methods and lists
  • Write your own amazing interactive stories using Ruby

Along the way, you'll meet colorful characters from around the kingdom, like the hacker Queen, the Off-White Knight, and Wherefore the minstrel. Ruby Wizardry will have you (or your little wizard) hooked on programming in no time.

For ages 10+ (and their parents!)

Mabel and the Sock Pirates

The Saggy Baggy Elephant

The Elementary/Middle School Counselor's Survival Guide (3rd Edition) (Survival Guides, Volume 162)

An Awesome Book Of Thanks!

The Story of Miss Moppet

 

 

 

 

 

 

 

 

 

 

 

 

[order_one, order_two, order_three, order_four] => [["sunny_side_up_egg", "sunny_side_up_egg", "sunny_side_up_egg"], ["sunny_side_up_egg", "sunny_side_up_egg", "sunny_side_up_egg"], ["hash"], ["egg", "hash"]] “That’s awesome! todays_orders is an array that contains four other arrays: order_one, order_two, order_three, and order_four,” Squeaky Jim said. “We’ll be done in no time. If we’ve got our orders packed up in an array, though, how do we get them back out?” Even More Array Methods! “There

ends of the range, while three dots included the first end but only up to (not including) the second one: >> => >> => (1..5).to_a [1, 2, 3, 4, 5] (1...5).to_a [1, 2, 3, 4] We also learned a few range methods, including to_a (which turns a range into an array), first (which returns the first item in the range), and last (which returns the last item in the range): >> => >> => >> => ('a'..'c').to_a ["a", "b", "c"] ('a'..'c').first "a" ('a'..'c').last "c" All right! We made it. Great work so

203 Contents in Detail   xiii 10 A Horse of a Different Color 207 Utter Panda-monium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 Creating Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 Extending Your Knowledge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . 304 Intermediate Books . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 Advanced Books . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 Online and Multimedia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 Interactive Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 Additional Topics . . . . . . . . . . . . . . . . . . . . . .

it should end with a >. In this book, we’ll simplify that to look like this: >> Whenever you see >>, we’ll be using IRB. If you type this after the >> (don’t forget the quotation marks—they’re very important!): >> puts "Ruby is awesome!" when you press enter, you should see Ruby print out: Ruby is awesome! => nil Excellent! We’ve written a simple program to print some text to the screen. You’ll also see Ruby say something about “nil.” Don’t worry about this just yet; I’ll explain that part in

Download sample

Download