0% found this document useful (0 votes)
109 views

Code.org SessionPlan#3(1 4)

Uploaded by

mzmegastorm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views

Code.org SessionPlan#3(1 4)

Uploaded by

mzmegastorm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Code.

org
LESSON 3:
Bug and Debugging
Warm - up

Hello, how are you today?


Let’s quickly revise what we learned in the previous session.
What is Sequence?
*students reply*
Sequence is the correct order of doing something.

What is Algorithm?
*students reply*
An algorithm is a step-by-step procedure for solving a problem or performing a
task. It is a set of instructions that are followed in a specific order to achieve a
desired outcome. Algorithms can be used in computer programming and in
everyday life to solve problems and accomplish tasks efficiently and effectively.
Problem Statement

One sunny day, their teacher, Ms. Smith, introduced them to a magical world of
coding. She told them about a remarkable project on code.org that would allow
them to create their very own customized photo frames. Excited and curious, the
students gathered around the computer as Ms. Smith explained how the project
worked.
Solution

In this enchanting adventure, Alex, Lily, and Max embarked on a journey to bring
their artistic dreams to life. They were given the power to choose from a wide
variety of shapes, colors, and decorations to design their unique photo frames.
With the help of code blocks, they could make their frames sparkle, add playful
stickers, and even create animated effects.
Bug

Let’s learn something new today!


Do you know what a maze is?
Answer: It's a type of puzzle where you have to find your way through a complex
network of paths, choosing the correct path to reach the end. Solving a maze can
be a fun and challenging activity.

So now that you know what a maze is, how about we solve this puzzle?

We're going to find our way through a maze! Let's draw the path with a red color
for the wrong way and a green color for the correct way. Are you ready to help
me find the right path?
Bugs and Debugging

Just like we solved the maze, when we give instructions to a computer, we


sometimes make mistakes. To fix these mistakes, we need to look at the
commands and find out where we went wrong.

Finding and fixing mistakes in a computer program is called


"debugging." Mistakes in a program are sometimes called "bugs."

Just like real bugs, they can cause problems and make the computer do
something we don't want it to do. But with debugging, we can fix the bugs
and make sure the computer does what we want it to do.

So how do we check bugs in a program and how do we correct them?


Bugs and Debugging

Bug: When we write instructions for a computer program and it doesn't


work the way we want it to, we need to go back and check the code. We
have to find out where we made a mistake and fix it so that the program
works properly.
Debugging: Once we find the mistake in our code and fix it, we need to
make sure that the program is working properly. We check to see if
everything is working the way it should.
Now, let's fix some puzzles that need correcting! We're going to be like
detectives, finding mistakes and making them right. Are you ready my little
detective(s)?
*student reply*
Good! Now let’s help Scrat find his Acorns!
*student reply*
Student Login

Step 1: Open the link and click on “sign in”.


(Share this link with the students in the comment section).
Link: http://www.studio.code.org

Step 2: To sign in to the platform, enter the section code.


(Share the section code created by you this is session)
Once done, click on the ‘Go’ option to log in.
Student Login

Step 3: Time to choose your name from the


names listed in the grey boxes.

Step 4: Now, enter the ‘secret words’ as given


by your teacher and type them in the white
box below the instruction: “Now enter your
secret words”.
(Refer to the image attached)
Instructions for Teachers
Solve the given puzzle.
Firstly use the ‘Step’ button to run one code
block at a time and try to find the mistake (bug)
in the code.

You will notice that the angry bird stop one step
before pig.

One line of code is missing. This is the bug in the


given program.

Add an ‘E’ block to make Angry Bird reach the


pig and kill it. This part is the debugging in our
program.
Maze Debugging
Puzzles

Activity Link: Maze Debugging Puzzles


Activities For Students

Complete all puzzles if possible:

1. https://studio.code.org/s/course1/lessons/5/levels/2
2. https://studio.code.org/s/course1/lessons/5/levels/3
3. 3. https://studio.code.org/s/course1/lessons/5/levels/4
4. https://studio.code.org/s/course1/lessons/5/levels/5
5. https://studio.code.org/s/course1/lessons/5/levels/6
6. https://studio.code.org/s/course1/lessons/5/levels/7
Programming with Harvester

Activity Link: Harvester Puzzles

Note: Perform this activity when time permits else start


developing the project.
Activities For Learner

Complete all these puzzles according to the pace of learner:

1. https://studio.code.org/s/courseb-2023/lessons/5/levels/2
2. https://studio.code.org/s/courseb-2023/lessons/5/levels/3
3. https://studio.code.org/s/courseb-2023/lessons/5/levels/4
4. https://studio.code.org/s/courseb-2023/lessons/5/levels/5
5. https://studio.code.org/s/courseb-2023/lessons/5/levels/6
6. https://studio.code.org/s/courseb-2023/lessons/5/levels/7
Artist Lab Project
Activity Link: Artist Lab Project
Artist Lab Project

Now, let us meet our new friend, Mr. Artist.

What is the name of your best friend?

Ok, so let us call Mr. Artist by the name of your friend.


Now, we will help Mr. Artist (best friend’s name) to draw something.
(Explain steps from ‘how to login’ to ‘how to save the project’).
Artist Lab Project

You need to follow the following steps:


1. Make sure you are logged in to code.org platform.
(Share the link with students on chat and ask them to click on the link below)

2. Open the shared link,


https://studio.code.org/projects/artist_k1/nngsfjgq2Hy4MJL9CSOIpQq-aqNmNa-
RWxHFSYrMloU/edit

3. Click on ‘remix’ and start drawing.

4. After completion, click on ‘rename’ and assign an appropriate name.

5. Finally, click on ‘save’.


Artist Lab Project

1. Teacher explains how to draw a line and


square on Artist Lab.
2. Explain directional blocks (N, S, E, W, NE, SE,
NW, SW).
3. Explain how to change the colour of the square
made. Use ‘Set Colour’ block.
4. Inform students to only use the blocks that
were taught in the class.
5. Inform students that Pink block and Repeat
Block should not be used for now. Tell
them that they will use those when they learn
about ‘repeat block’.
Photo Frame

We will create a Customized Project within the


Artist Lab on code.org using directional blocks
(N, S, E, W, NE, SE, NW, SW).
We will create a square frame of your favorite
color or pattern by using ‘Set Colour’ or ‘Set
Pattern’ block.
We will place your favorite sticker in the
middle of the square.
Photo Frame

To create a Customized Photoframe project on code.org, we need to


follow the below steps:

1. Design outer square.


2. Design inner square.
3. Place a sticker at middle of the square.
Coding of Project

1. Design outer square:

● Set pattern of your choice.


● Design all four sides of the
square using the directional
blocks.
Coding of Project

2. Design inner square:

● Set pattern of your choice.


● Design all four sides of the
square using the directional
blocks.
Customized Photo Frame Code

3. Place sticker at middle of the square:

● To place your favorite sticker in the middle of the


square use jump SE blocks thrice and S block twice
and a N block and then use the draw sticker block.
● Place Mr. Artist at South East by dragging and
dropping two Jump SE blocks.
Artist Lab Project For Slow
Learners

Simple Photo Frame

Links:
Empty Project
Completed Project
Resource Table

Link Activities Links

Project link Maze Debugging Puzzles


For Students
Harvester Puzzles

Assignment Assignment
Wrap - Up

Okay, so here we come to the end of the session. Congratulations! You


did very well in the class today.

How about we revise what we studied today?


● What is bug?
● What is debugging?
● Which button is used to check each
line of code?
● We have helped Artist, Harvester and
Angry Bird.
Thank You !

27

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy