13.07.2015 Views

Harvard Scratch Intro Notes (PDF) - Department of Computer Science

Harvard Scratch Intro Notes (PDF) - Department of Computer Science

Harvard Scratch Intro Notes (PDF) - Department of Computer Science

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ProgrammingPutting on Socks1. let socks_on_feet = 02. while socks_on_feet != 23. open sock drawer4. look for sock5. if you find a sock then6. put on sock7. socks_on_feet++8. look for matching sock9. if you find a matching sock then10. put on matching sock11. socks_on_feet++12. close sock drawer13. else14. remove first sock from foot15. socks_on_feet--16. else17. do laundry and replenish sock drawerCopyright © 2006, David J. Malan 6


ProgrammingSaying Hello in <strong>Scratch</strong>Hello1.scratchCopyright © 2006, David J. Malan 8


ProgrammingStatements...Copyright © 2006, David J. Malan 9


ProgrammingStatementsHello{2,3}.scratchCopyright © 2006, David J. Malan 10


ProgrammingBoolean Expressions...Copyright © 2006, David J. Malan 11


ProgrammingConditions...Copyright © 2006, David J. Malan 12


ProgrammingConditionsHello{4,5}.scratchCopyright © 2006, David J. Malan 13


ProgrammingLoopsCopyright © 2006, David J. Malan 14


ProgrammingLoopsHello{6,7,8}.scratchCopyright © 2006, David J. Malan 15


ProgrammingVariables{Count,Hello9}.scratchCopyright © 2006, David J. Malan 16


ProgrammingMove1.scratchCopyright © 2006, David J. Malan 17


ProgrammingThreadsMove2.scratchCopyright © 2006, David J. Malan 18


ProgrammingThreadsHello10.scratchCopyright © 2006, David J. Malan 19


ProgrammingEventsMarco.scratchCopyright © 2006, David J. Malan 21


<strong>Computer</strong> <strong>Science</strong> S-1<strong>Harvard</strong> Summer School2006Lecture <strong>Notes</strong> on <strong>Scratch</strong>David J. Malanmalan@post.harvard.edu+1-617-523-0925Copyright © 2006, David J. Malan 29

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

Saved successfully!

Ooh no, something went wrong!