Presentation is loading. Please wait.

Presentation is loading. Please wait.

As you come in…  Sign in (in back) and pick up  Badge  Name Card – write your first name LARGELY on back  Any questions? (of any kind)  Put on index.

Similar presentations


Presentation on theme: "As you come in…  Sign in (in back) and pick up  Badge  Name Card – write your first name LARGELY on back  Any questions? (of any kind)  Put on index."— Presentation transcript:

1 As you come in…  Sign in (in back) and pick up  Badge  Name Card – write your first name LARGELY on back  Any questions? (of any kind)  Put on index cards, drop in box (up front)  Log in:  Launch/Start Alice  Open a web browser, log in at Check your for invitation

2 Question!  How do you remember all of this?!?!?  I am used to taking notes…  VERY GOOD QUESTION!  It’s because of the computer…  The ability to interact with it to “find out what’s true”

3 How do you remember what to say about specific topics (questions, slides, etc.)  We’ve got copious notes for you  On each slide  We have videos  Demoing as we would do in class  Watch them yourself, or have students watch them

4 Agenda (modify?)  Dates for Summer PD  UCSD Class Month of July (observe once, optional attend)  Basics of Programming: Flow of Control  How programs are different than essays  Sequential, Parallel, Repeated, Conditional  Nested Loops  One loop inside another  Nested Ifs  One if inside another (in “true” or “false” part)

5 Vocabulary Review  Object  Instruction / Tile  Method  Parameter  Loop (aka Counted Loop) -- repetition  If statement -- conditional

6 Nested Loop: Eat At Joe’s (lecture example)  Let’s look at it  Show how to make something invisible  Build the code together

7 Eat At Joes, Nested Loop  Opacity 1 is visible  Opacity 0 is invisible

8 Nested Loops: Bunny Square Dance  We want to direct the bunny to hop in a square pattern. The “length” of each side of his square should be 5 hops.  Let’s watch  Break down the problem:  Create “one side” of square  Create turn  Repeat that whole thing…

9 Nested Loops: Bunny Square Dance  We want to direct the bunny to hop in a square pattern. The “length” of each side of his square should be 5 hops.  Let’s watch  Here’s the structure of our code, what numbers would you put in for each missing number?

10 Outer Loop countInner Loop countTurn parameter A45.25 B451 C54 D541 Goal: Hop in a square, 5 hops on each side

11 Review: Ifs – Conditional Execution  With one if statement, we could do  Either “then block” or the “else block” but not both Else block Then block

12 More Complex Conditional Execution (e.g. more than one “test”) bb

13 bb

14 bb

15 Let’s make a game!  Player can click on a ball  The bunny will say something different depending on the ball chosen.  We’ll build up our solution a bit at a time  Get red and blue working (with one if statement)  Get green working (nested if statement)  Online Textbook Example  Section 9.2 BUT WAIT!

16 EVENTS!  Simple way to take user control  Many ways, we’ll stick to “click on object”  NEW CONCEPT: Parameter  A value you can send to a method that controls how it works  Wait! We know this!  We’ll create our own parameter to the my first method If this is confusing, don’t worry, we’ll explore more…

17 What does this code do?  Assume that you have an event so that when you click on an igloo it calls a my first method and sends the igloo as a parameter  Next we’ll show you my first method and ask you what it does

18 What does this code do? When blue, red or green… Feedback Paraphrase Justify World.my first method

19 How many of the following are true? 1. When the igloo is blue, says Ice Cold! 2. When the igloo is red, says Hot! 3. When the igloo is blue, says Ice Cold! AND then says Try again! 4. When the igloo is green, nothing happens

20 Feedback Paraphrase Justify 1.blue, says Ice Cold! 2.red, says Hot! 3.blue, says Ice Cold! AND then says Try again! 4.green, nothing happens A)1B) 2C)3D) 4E)


Download ppt "As you come in…  Sign in (in back) and pick up  Badge  Name Card – write your first name LARGELY on back  Any questions? (of any kind)  Put on index."

Similar presentations


Ads by Google