1 / 20

As you come in…

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.

marrim
Télécharger la présentation

As you come in…

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 http://piazza.com • Check your email 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. 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 Then block Else block

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

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

  14. More Complex Conditional Execution(e.g. more than one “test”) • 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 youmy first methodand askyou what it does

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

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

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

More Related