CS 103 Highlights - Highlights for CS 103 These are...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Highlights for CS 103 These are highlights from the lectures in CS 103. You can use them to help you remember what was said. Each day starts a new page. The notes for future lectures are copies from a previous year’s notes, which give you a preview of what is to come in this year’s lectures. Those later notes will be updated to correspond to what is said in this year’s lectures shortly after each lecture takes place. Links to Specific Days (depress the Cntl key and click on the desired day): Week01_Wed Week01_Fri Week01_Mon Week02_Wed Week02_Fri Week02_Mon Week03_Wed Week03_Fri Week03_Mon Week04_ Wed Week04_Fri Week04_Mon TEST1 _Wed Week05_Fri Week05_Mon Week06 Wed Week06_Fri Week06_Mon TEST2 _Wed Week07_Fri Week07_Mon Week08 _Wed Week08_Fri Week08_Mon Week09_Wed Week09_Fri Week09_Mon TEST 3 _Wed Week10_Fri Week10_Mon Week11_Wed Week11_Fri Week11_Mon TEST 4 _Wed Week12_Fri Week12_Mon Week13_Wed Week13_Fri Week13_Mon Week14_Wed Week14_Fri TEST 5 Mon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Week 1, Wednesday, January 13, 2010 Go to OAK and look at News, Opening-of-Course Memo, Schedule, and Textbook. Read about the honor code. Install Scratch. Our first program : First.sb is available from the course webpage. Go to schedule and then click Week 1. Walking around a square:
Background image of page 2
Week 1, Friday, January 15, 2010 Project 1 has been assigned! Go to the course webpage. Go to schedule and then click Project 1. Our second Scratch program: Second.sb is available from the course webpage. Go to schedule and then click Week 1. Initialization code to make sure that the Sprite is in a state we want it to be: in the center facing right. Outer loop running four times, once for each side of the square the mouse walks around. First inner loop running 50 times animating the movement of the cat. Since each move consists of 2 steps, the cat moves 50x2=100 steps before each turn. The costume change imitates walking by alternating two images specified under the Costumes tab. The wait command slows thing down a little bit. Second inner loop running ten times animates the turn. Since each turn is 9 degrees, the cat turns 90 degrees, but in a smoother fashion. To decide randomly which turn the cat meow-s at, we flip a coin by asking for a random number between 1 and 2. If it is smaller than 2, it means it is 1. We have about a 50% chance of that. The only time the play command runs if the condition in the if statement is True. If it is false the instructions inside the if statement are skipped. Yellow boxes are comments. They are not part of the program. They provide helpful information for whoever reads your program.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Our third Scratch program: Third.sb is available from the course webpage. Go to schedule and then click Week 1. Key ideas: Follow the mouse pointer and turn toward it for ever Forever is a loop that never ends (it does when you stop the program).
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 72

CS 103 Highlights - Highlights for CS 103 These are...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online