Introduction to Programming: Module 1 Blockly

Slides:



Advertisements
Similar presentations
Bug Session One. Session description In this session, pupils are introduced to a programming sequence which will make a light pattern on their Bug. Objectives.
Advertisements

Managing Your Learners In this guide you will learn how to: Add classes to the Manage Your Learners page Add learners to the Manage Your Learners page.
This is Google Drive. It stores all the documents you have made here.
Bug Session One. Session description In this session, pupils are introduced to a programming sequence which will make a light pattern on their Bug. Objectives.
Karel J Robot An introduction to BlueJ and Object- Oriented Programming.
Introduction to TouchDevelop
DAY 4. MAKING SOMETHING ‘JUMP’ Simple! Move it a certain amount ‘up’ Glide back to your original spot.
Algebra using brackets
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
Launch Abby and Zack are mixing red and yellow paint to make an orange color to paint their kitchen table. They each think they have the perfect shade.
Computer Programming.
Intro CS – Loops & Creating Shapes
Teaching Characters to Walk: Learning Methods, Part 1
Introduction to Programming: Module #2 Python, Trinket, and Turtle Graphics Lois Delcambre.
Understanding Communication with a Robot? Activity (60 minutes)
Your teacher has announced that the class will be taking a field trip
EGR 2261 Unit 4 Control Structures I: Selection
UNIT 3 – LESSON 5 Creating Functions.
The Need for Programming Languages
Rule: double the number and add 1
Learning to program with Logo
Introduction to Computer Basics Part 2
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
For example, how can you use exponents to write
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
2 3 = …. LearnZillion Notes:
Creativity in Algorithms
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
Introduction to FOSSmap
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
Welcome to <INSERT school name>’s
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
Teacher Talk.
How do you determine an author’s purpose? LearnZillion Notes:
An Introduction to VEX IQ Programming with Modkit
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
Personalize Practice with Accelerated Math
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
Loops CIS 40 – Introduction to Programming in Python
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
An Introduction to VEX IQ Programming with Modkit
Go to =>
Go to =>
Repetition In today’s lesson we will look at:
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
Graphing and Describing “Rotations”
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
Hour of code Code.org The Maze.
1) 2) 3) 4) 5) Warm Up/Do Now Evaluate: OBJECTIVE: Try these problems
Staying Safe at School ALICE TRAINING for STUDENTS: ELEMENTARY LEVEL :Derived from Akron City Schools Teacher talk is in BOLD. Modify wording if needed.
Code Combat.
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
Using Logo and Logic This presentation uses a version of Logo called StarLogo available through MIT. It can be downloaded for free and installed on your.
Programming In Lesson 4.
Staying Safe at School ALICE TRAINING for STUDENTS: ELEMENTARY LEVEL :Derived from Akron City Schools Teacher talk is in BOLD. Modify wording if needed.
Welcome to Mountain View Elementary School!
creating a ecosystems model in net logo
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
For example: How do you show an increase of 12% over the original cost, if the original cost is $x? LearnZillion Notes: --This is your hook. Start with.
Digital Literacies for learning
LearnZillion Notes: --This is your hook. Start with a question to draw the student in. We want that student saying, “huh, how do you do X?” Try to be specific.
Presentation transcript:

Introduction to Programming: Module 1 Blockly (Lois Delcambre)

Part 1 – blockly

What is a program? A step-by-step set of instructions

an program – for a person allrecipes.com Just flash this long enough for people to realize that this is a recipe

A program for a pianist Same thing – just flash it http://www.elikamahony.com/2013/04/04/awakening-and-enchantment-piano-sheet-music-available/

Same thing – just flash it http://www.architecturendesign.net/18-clear-succinct-ways-to-wear-a-tie/

You need to know how to do the task, step by step, before you can write a program to perform that task! Imagine trying to write the instructions for tying a Windsor knot – if you don’t know how to do it.

Plan Blockly a programming language used at code.org - to teach beginners how to program Python a programming language used by Google and other companies. Also used for teaching. We’ll use the turtle module

Plan for today introduction to puzzles; blocks executed one after the other; repeat block (with blocks inside) blocks that check conditions repeat while, if, if/else defining new blocks/commands by defining functions

a puzzle You need to write a program so that the bee can: get all the nectar (from flowers) & make all the honey (in honeycombs) I think you can go very quickly through the next dozen slides or so.

the bee

dark green squares - where the bee can move

The rest of the puzzle board can be ignored. The bee can’t go there.

a flower where a bee can get nectar small number tells you how many times the bee can sip nectar here

a honeycomb where a bee can make honey small number tells you how many times the bee can deposit honey here

bee blocks/commands forward (one square) turn left/right get nectar from a flower make honey in a honeycomb

One program that works …

Another program that works …

A program that doesn’t work … Why not?

Screen layout – for blockly

the puzzle

the description of the puzzle

the commands/blocks you can use

your program

drag and click commands to attach them to other commands

Pull them apart to rearrange your commands (note this program has an error)

Pull them apart again

drag and click in a new block

fill in how many times you want to repeat

drag and click command(s) into repeat block

push this button to run your program

Demo at code.org Go to the code.org website Click on “Elementary School” under “Educators” – the blue box second from the left Click on “Curriculum Overview” Click on Course 3

go to Course 3

Course 3, Lesson 13, Puzzle 1: bee nested loops

Course 3, Lesson 13, Puzzle 1: bee nested loops Modify/complete this program to solve the puzzle

More Class Activity Write two different programs for each Course 3, Lesson 13, Puzzle 2 (skip the video) Course 3, Lesson 13, Puzzle 3 Also … try to make mistakes, run the puzzle before you complete it, move outside of the dark green area, try to make honey, etc. I can imagine that you won’t do this for the teacher workshop.

Plan for today introduction to puzzles; blocks executed one after the other; repeat block (with blocks inside) blocks that check conditions repeat while, if, if/else defining new blocks/commands by defining functions

take the Zombie to the sunflower; avoid the chomper Could you write the program? zombie chomper

Some commands can check conditions A condition returns either True or False A condition can be checked each time a repeat until block is about to run A condition is checked once for an if command Note: in blockly, specific conditions (for the puzzle you’re working on) are built-in.

The beginnings of a program Course 3, Lesson 8, Puzzle 3

A completed program that works

Maze (zombie); Course 3, Lesson 8, Puzzle 4 everyone try it

Class Activity to practice conditionals Course 3: Lesson 8, Puzzle 1, 2, 3, and 8 if/else and repeat until with the zombie

Plan for today introduction to puzzles; blocks executed one after the other; repeat block (with blocks inside) blocks that check conditions repeat while, if, if/else defining new blocks/commands by defining functions

Defining new commands!!! video Make sure this link works. It should be a video of Chris Bosh explaining how you can “define new commands” in blockly by defining functions. He makes some great basketball analogies. I want to show this to the teachers because this (to me) is probably one of the most important parts of the CS curriculum. Students need to know that through the use of functions they can make their code: more readable, more reusable, much more easy to debug/develop, and so on. So , it would be god for teachers to see this. Video is short – maybe a minute or two. I linked to the youtube version of this video; there’s a copy on the code.org site; I can find it for you if you like.

Note: we’ve seen functions before This next part could be skipped – but you can also flash through it.

http://kids.niehs.nih.gov/games/songs/childrens/baa_baa_black_sheepmp3.htm Chorus: Baa, baa black sheep, Have you any wool? Yes sir, yes sir, Three bags full. One for the master. One for the dame. And one for the little boy who lives down the lane. Chorus One to mend the jerseys, One to mend the socks. And one to mend the holes In the little girl's socks.

http://kids.niehs.nih.gov/games/songs/childrens/baa_baa_black_sheepmp3.htm function definition Chorus: Baa, baa black sheep, Have you any wool? Yes sir, yes sir, Three bags full. One for the master. One for the dame. And one for the little boy who lives down the lane. Chorus One to mend the jerseys, One to mend the socks. And one to mend the holes In the little girl's socks. function name function invocation

Note: we are expected to sing the chorus http://kids.niehs.nih.gov/games/songs/childrens/baa_baa_black_sheepmp3.htm function definition Chorus: Baa, baa black sheep, Have you any wool? Yes sir, yes sir, Three bags full. One for the master. One for the dame. And one for the little boy who lives down the lane. Chorus One to mend the jerseys, One to mend the socks. And one to mend the holes In the little girl's socks. Note: we are expected to sing the chorus in the beginning, once. In a program, the function definition is NOT executed. It is only executed when we have a function invocation. function name function invocation

Another Example of Function Definition and Invocation (on next page) Triple Coconut Cake Recipe http://www.seriouseats.com/recipes/2017/06/coconut-cake-recipe.html

This recipe asks you to make other recipes (defined elsewhere) Triple Coconut Cake Recipe More ingredients More instructions

Function Invocation Triple Coconut Cake Recipe More ingredients More instructions

Let’s see functions in blockly The next dozen or so slides just explain how function definition appears in blockly. Teachers should get the idea of what this is – maybe by discussing it with their neighbor. They may or may not want to try using it in blockly.

This gray box defines a function; you can put code in the gray box

Here is the name of the function

the new function is just like any other command!

“get 5” command is in the program (note: this program doesn’t work)

Class Activity to practice using functions Course 3, Lesson 6: Puzzles 3, 4, and 5 Show this to teachers but don’t expect them to do it. (or, don’t even show it.)

For practice repeat, repeat until, if, and functions Course 3: Lesson 13 – all puzzles Course 3: Lesson 8 – all puzzles Course 3: Lesson 6 – all puzzles This doesn’t really need to be in here – but it can be; just don’t spend any time here. I may change it for 2017.