Tamagotchi 4 - Changing Variables

My Virtual Pet 4 - 
Changing Variables

GOTO:
lessonup.app
Enter the code on the board
1 / 19
next
Slide 1: Slide
ComputingLower Secondary (Key Stage 3)

This lesson contains 19 slides, with interactive quizzes, text slides and 2 videos.

time-iconLesson duration is: 60 min

Items in this lesson

My Virtual Pet 4 - 
Changing Variables

GOTO:
lessonup.app
Enter the code on the board

Slide 1 - Slide

Starter & Logins
Log in to Teams and Scratch then open Bourne to code with the links below:

Slide 2 - Slide

Learning Objectives
Consolidate your existing knowledge on:
  •  Functions
  • Variables 
  • Loops

Slide 3 - Slide

One minute: Pair;
Discuss what a variable is?

Slide 4 - Slide

One minute: Think;
What is a variable?

Slide 5 - Slide

Two minutes: Share;
Describe a variable.

Slide 6 - Open question

Slide 7 - Video

The "repeat" and "repeat until" blocks are examples of _________ in computer programming
A
Iteration
B
Variables
C
Events
D
Functions

Slide 8 - Quiz

What is the difference between a "repeat" block and a "repeat until" block?

Slide 9 - Open question

Slide 10 - Video

Quick, Catch up!
Open the Scratch project here
Press the                   button

You're caught up!

Slide 11 - Slide

Task one: Keep your pet alive.
We've coded a way to starve our pet... let's add a way to keep it fed.
Obtain a new sprite for food in one of these ways:
Upload the sprite
Add code:

Slide 12 - Slide

🏅 Badge Tasks
🥈 Silver Badge
Find or make an image to represent a drink for your pet. PetThirst should increase gradually and then be reset to 0 when the drink sprite is clicked. If it reaches 100, the pet should die.

🥇 Gold Badge
Find or make an image to represent a bed for your pet. PetTiredness should increase gradually and then be reset to 0 when the bed sprite is clicked. If it reaches 100 the pet should die.

🥉 Platinum Badge
PetHappiness should start at 100 and gradually decrease until it hits 0, at which point the pet should die. If the pet sprite is clicked (representing stroking the pet), then it’s happiness should be reset to 100.

Upload a screenshot of your code for each task; named "silver", "gold" and "platinum", to today's assignment on Teams.



Slide 13 - Slide

One Minute: Think;
Last lesson we created the function block "KillPet".

What is a function?

Slide 14 - Slide

One minute Pair:
Last lesson we created the function block "KillPet".

Discuss what a function is.

Slide 15 - Slide

Two minutes: share; Last lesson we created the function block "KillPet".
Describe what a function is.

Slide 16 - Open question

Functions

Slide 17 - Slide

Variables are used to...
A
Remember things
B
Store data in computer memory
C
delete data
D
None of these

Slide 18 - Quiz

What is iteration?
A
An operation that combines two sequences.
B
A decision-making process.
C
Repeating a process or set of instructions.
D
A way to store and organize data.

Slide 19 - Quiz