Tamagotchi 4 - Changing Variables

My Virtual Pet 4 - 
Changing Variables

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

In deze les zitten 19 slides, met interactieve quizzen, tekstslides en 2 videos.

time-iconLesduur is: 60 min

Onderdelen in deze les

My Virtual Pet 4 - 
Changing Variables

GOTO:
lessonup.app
Enter the code on the board

Slide 1 - Tekstslide

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

Slide 2 - Tekstslide

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

Slide 3 - Tekstslide

One minute: Pair;
Discuss what a variable is?

Slide 4 - Tekstslide

One minute: Think;
What is a variable?

Slide 5 - Tekstslide

Two minutes: Share;
Describe a variable.

Slide 6 - Open vraag

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

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

Slide 9 - Open vraag

Slide 10 - Video

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

You're caught up!

Slide 11 - Tekstslide

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

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

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

What is a function?

Slide 14 - Tekstslide

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

Discuss what a function is.

Slide 15 - Tekstslide

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

Slide 16 - Open vraag

Functions

Slide 17 - Tekstslide

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

Slide 18 - Quizvraag

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