Tamagotchi 4 - Changing Variables

My Virtual Pet 4 - 
Changing Variables

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

Cette leçon contient 19 diapositives, avec quiz interactifs, diapositives de texte et 2 vidéos.

time-iconLa durée de la leçon est: 60 min

Éléments de cette leçon

My Virtual Pet 4 - 
Changing Variables

GOTO:
lessonup.app
Enter the code on the board

Slide 1 - Diapositive

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

Slide 2 - Diapositive

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

Slide 3 - Diapositive

One minute: Pair;
Discuss what a variable is?

Slide 4 - Diapositive

One minute: Think;
What is a variable?

Slide 5 - Diapositive

Two minutes: Share;
Describe a variable.

Slide 6 - Question ouverte

Slide 7 - Vidéo

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 - Question ouverte

Slide 10 - Vidéo

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

You're caught up!

Slide 11 - Diapositive

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 - Diapositive

🏅 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 - Diapositive

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

What is a function?

Slide 14 - Diapositive

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

Discuss what a function is.

Slide 15 - Diapositive

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

Slide 16 - Question ouverte

Functions

Slide 17 - Diapositive

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