As you come in…
description
Transcript of As you come in…
![Page 1: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/1.jpg)
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 http://piazza.com
Check your email for invitation
![Page 2: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/2.jpg)
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”
![Page 3: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/3.jpg)
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
![Page 4: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/4.jpg)
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)
![Page 5: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/5.jpg)
Vocabulary Review
Object Instruction / Tile Method Parameter Loop (aka Counted Loop) -- repetition If statement -- conditional
![Page 6: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/6.jpg)
Nested Loop: Eat At Joe’s (lecture example)
Let’s look at it Show how to make something invisible Build the code together
![Page 7: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/7.jpg)
Eat At Joes, Nested Loop
Opacity 1 is visible Opacity 0 is invisible
![Page 8: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/8.jpg)
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…
![Page 9: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/9.jpg)
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?
![Page 10: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/10.jpg)
Outer Loop count Inner Loop count
Turn parameter
A 4 5 .25
B 4 5 1
C 5 4 .25
D 5 4 1Goal: Hop in a square, 5 hops on each side
![Page 11: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/11.jpg)
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
![Page 12: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/12.jpg)
More Complex Conditional Execution(e.g. more than one “test”)
b
![Page 13: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/13.jpg)
More Complex Conditional Execution(e.g. more than one “test”)
b
![Page 14: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/14.jpg)
More Complex Conditional Execution(e.g. more than one “test”)
b
![Page 15: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/15.jpg)
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!
![Page 16: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/16.jpg)
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…
![Page 17: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/17.jpg)
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 youmy first method and askyou what it does
![Page 18: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/18.jpg)
What does this code do?When blue, red or green…
FeedbackParaphrase
Justify
World.my first method
![Page 19: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/19.jpg)
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
![Page 20: As you come in…](https://reader034.fdocuments.us/reader034/viewer/2022051622/568151fb550346895dc03311/html5/thumbnails/20.jpg)
FeedbackParaphrase
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) 1 B) 2 C)3 D) 4E)