Welcome to Computer Programming For Kids (CP4K)

Welcome to the Computer Programming for Kids blog! We are the co-authors of the book "Hello World! Computer Programming for Kids and Other Beginners", released in March 2009. The book is published by Manning Publications. Manning has a web site for the book, which is where you can download the software and other files related to the book. You can purchase it here, at the Manning web site. If you use this link to purchase the print book or e-book from the Manning web site, you can use the discount code aupromo40 at checkout to get a 40% discount. You can also get it through online retailers like Amazon, as well as in many retail locations such as Chapters in Canada and Barnes & Noble in the U.S. This blog is mostly about the book (for now), but anything related to computers and programming, particularly for kids and beginners, is fair game. We will post articles with extra material that didn't make it into the book, and reader feedback and suggestions are always welcome.

Monday, June 29, 2009

Connect the Dots 2

In Chapter 16 of Hello World, we presented a Connect the Dots program that would create a "mystery picture". (This is Listing 16.10.)

One of our readers created another version that draws the dots and lines one at a time, instead of all at once. So it's kind of an "animated" version of the Connect the Dots program.

Once again, we want you to type this one in, not just cut-and-paste it from the download site. Here's the code for the animated version:



This code might look a little fuzzy, and some of the lines are cut off. That's because it's an image of the code, and that's the way Blogger displays the image. If you click on the code, you'll get a much more clear version with nothing cut off. But it's still an image, so you can't copy-and-paste the code.

As we mentioned in the book, the list of dot coordinates is available from the download site, so you don't have to type in all those numbers. (Just copy-and paste them from your browser to the code editor.) But you do have to type in the rest of the program if you want to see the picture.


3 comments:

  1.  

    Well, gotta start somewhere ... This is just my way of saying the following:

    1. found the book in the library
    2. read it in two days
    3. love it
    4. I've seen the maple leaf
    5. I've typed in the animated maple leaf
    6. works like a charm

    Thanks Warren and Carter for a masterpiece. I'm promoting it and look forward to learning a lot of Python. I have a Facebook group that started about 2 months ago that I hope you visit. I call it "not just tiny-c Programming Group" and you can credit yourselves for the recent prepending of the "not just."

    not just tiny-c Programming Group

    Here's a little movie you might enjoy ...

    connect the dots

     

    ReplyDelete
  2. How can I e-mail you if I have a question?

    ReplyDelete
  3. Send an e-mail to cp4khelp@yahoo.com

    ReplyDelete

Note: Only a member of this blog may post a comment.