|
Computer Science Home
6th Grade Tech Ed
7th Grade Computer Science
8th Grade Computer Science A
Gmail
Google Drive
Google Classroom
Infinite Campus
Typing.com
(Join Class through Google Classroom)
Schoology
Code.org
Tynker Coding Website
Tynker Resource Page
Tynker Online Support Video Help
Quizlet | Quizlet LIVE
Everfi
Khan Academy
Social Media Tips
Netsmartz
Code HS
Karel the Dog class code: 1251
CSTA Standards
ISTE Standards
|
Programming 101 Introduction
Time: 60+ mins
Introduction
Welcome to Programming 101, a course for beginner coders! In this lesson, students are introduced to coding by solving fun puzzles. By the end of this lesson, students will have used coding concepts such as simple commands, loops, conditional loops, and conditionals to help a friendly monster collect candy!
Walk-throughs:
New Code Blocks
- : Start program when the play button is selected.
- : Move the Actor one step forward.
- : Make the Actor jump over an obstacle, landing on the other side.
- : Repeat blocks inside this loop a specified number of times.
- : Make the Actor repeat this loop until a true or false [boolean value] determines when the block should stop repeating the code inside it.
- : Make the Actor repeat this loop while the condition is true.
- : If the condition is true, then run the code inside the block.
- : If the condition is true, then run the code inside the “if” section. Otherwise, run the code inside the “else” section.
Vocabulary
- Coding: Using a computer language to tell the computer what to do
- Sequence: The order in which steps or events happen
- Actors: Tynker characters and objects that can talk and interact with each other
- Command: A specific action or instruction that tells the computer to do something
- Loop: An action that repeats one or more commands a specific number of times
- Counting loop: A loop that repeats one or more commands a specific number of times
- Condition: A logical expression that evaluates to true or false
- Conditional statement: A type of statement that executes different parts of the code based on whether a logical expression evaluates to true or false.
Objectives
Students will...
- Use code blocks to create a program
- Apply sequencing of steps
- Use loops for repetition
- Use conditional statements and branching logic
Materials
- Computers, laptops, or mobile devices (1 per student) with student account access to Tynker.com
Activities (45 minutes)
Facilitate as students complete all Introduction modules on their own:
1. Pick Up the Candy (Puzzle)
- Students will need to use two “walk” blocks to get the monster to the candy.
- Check that students are attaching their code blocks.
- Introduction
2. Get the Gum Drop (Puzzle)
- Students will practice using the “walk” block to solve a slightly more challenging puzzle.
- Are students struggling? Give a hint: Tell students to look at how many spaces are in front of the monster, then have it “walk” that many times.
3. Avoid the Obstacles (Puzzle)
- This puzzle introduces the “jump” block, which makes the monster jump over an obstacle and land on the other side.
- Students will have to use the correct sequence of “jump” and “walk” to solve the puzzle.
- Are students struggling? Encourage them to say or write down the sequence before using any code blocks.
- Avoiding Obstacles and Using Loops
4. Repetition with Loops (Puzzle)
- This puzzle introduces the "repeat" block, which tells the monster to do the same thing a specific number of times.
- Check that students are attaching the “walk” block inside the “repeat” block.
- Optional: Ask students, “Why does the ‘repeat’ block have a value of ‘9’?” (There are 9 spaces in front of the monster, so we need the “walk” block to repeat 9 times)
- Optional: Ask students to solve the puzzle module without the “repeat” block. Ask, “Do you think this program is better with or without the ‘repeat’ block?”
5. Repeat the Pattern (Puzzle)
- Encourage students to look for a pattern and say or write down the steps before using any code blocks.
- Students can solve this puzzle by placing the “walk” and “jump” blocks three times, but encourage them to use the “repeat” block.
- Are students struggling with the “repeat” block? Give a hint: Tell students that two code blocks need to go inside the “repeat” block.
6. Sequenced Repetition (Puzzle)
- In this puzzle, students will need to avoid the blue block.
- This puzzle is similar to the previous one, but students will need to attach one “walk” block below the “repeat” block.
7. Two Loops (Puzzle)
- There are a variety of ways to solve this puzzle, so students can be creative.
- Optional: Encourage students who find one solution quickly to come up with a different one! For example, students may figure out that they don’t need to have an obstacle to use the “jump” block; it just moves them forward two spaces. Here’s a different creative solution: “On Start - Jump - Walk - Jump - Jump - Walk.”
- Are students struggling? Encourage them to say or write down the monster’s sequence before using any code blocks.
- Give a hint: Tell students to place one “jump” block between two “repeat” blocks.
8. Using Conditional Loops (Puzzle)
- Although students can solve this puzzle by using the “jump” and “walk” blocks two times, encourage them to use the “repeat until” block.
- Remind students that the monster will repeat blocks inside the “repeat until” loop until it reaches the jelly bean. Emphasize that the code stops repeating once the monster reaches the jelly bean.
- Give a hint: Tell students that two code blocks go inside the “repeat until” loop.
9. Using "Not" in Loops (Puzzle)
- Although students can solve this puzzle by using the “walk” and “jump” blocks three times, encourage them to use the “repeat while” block.
- Ask, “What does the monster need to do to reach the gumdrop?” (walk - jump - walk - jump - walk - jump)
- Remind students that the monster will repeat blocks inside the “repeat while” loop while it does not have a gumdrop.
- Emphasize that the code inside the “repeat while” loop stops repeating once the monster reaches the gumdrop.
- Give a hint: Tell students that two code blocks go inside the “repeat while” loop.
10. Conditionals (Puzzle)
- Ask, “What should the monster do if there is a blue block one space in front of it?” (jump)
- Ask, “What action should the monster repeat until it reaches the red mint?” (walk)
- Explain to students that the “if” block will only work when the monster has a blue block one space in front of it.
- Give a hint: Tell students to place the “if” block inside the “repeat until” block.
11. Multiple Conditionals (Puzzle)
- This puzzle uses multiple conditionals to get the monster to the gumdrop.
- Give a hint: Tell students to place two different “if” blocks inside the “repeat until” block.
- Ask, “If there is a blue block in front of the monster, what do we need it to do?” (jump)
- Ask, “If there is a path in front of the monster, what do we need it to do?” (walk)
- If Conditionals Nested inside Do Until Conditionals
12. If-Else (Puzzle)
- This puzzle introduces the “if-else” block, which has two separate possible outcomes.
- Ask, “If there is a bottle cap, what do we need the monster to do?” (jump)
- Explain that “else” is another way of saying “otherwise.”
- Ask, “Otherwise, what do we need the monster to do?” (walk)
- Give a hint: Tell students to place one “if-else” block inside the “repeat until” loop.
- Another way to phrase the solution is: If there is a bottle cap in front of the monster, it will jump. Otherwise, the monster will walk.
- Nesting Conditionals and using an If then, Else Block
U.S. Standards
- K-12 CTSA Computer Science Standards (Revised 2017)
Computer Science Teachers Association:
- 1B-AP-10
- 1B-AP-11
- 1B-AP-12
- 1B-AP-15
- 2-AP-12
- 2-AP-13
- 2-AP-15
- 2-AP-16
- 2-AP-17
CCSS-Math: MP.1
- CCSS-ELA: RF.5.4.A, 6-8.RST.3, 6-8.RST.4, 6-8.RST.7
- CS CA: 3-5.AP.10, 3-5.AP.12, 3-5.AP.13, 3-5.AP.14, 3-5.AP.17, 6-8.AP.12, 6-8.AP.13, 6-8.AP.16, 6-8.AP.17
- ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b
|