Building "Addy" the Addition Chatbot
Skills:
Visual / Block Coding90%
Key Takeaways
Builds a math chatbot using Scratch 3.0
Full Transcript
okay everybody we are going to get started so make sure you have scratch open okay and today we are going to create a calculator uh game okay so we're going to create a character named adi okay and addie is going to be just like a chatbot that we have talked to before but adi is going to be slightly different addie is going to not only ask you questions but also is going to give you answers based on the kind of things that you respond with okay adi is going to be really good at adding numbers but he's also going to be able to challenge the the player if he wants to if we have time then we can also get addy to ask us a a and calculate a question and then see if we can calculate it ourselves all right so it's going to be a fun little game all right so first thing we're going to do is make addie uh um introduce herself okay or himself depending on what character you have so i'm going to go into events when flag clicked when flag clicked that is going to be when we get started what's addy going to do she's going to tell us and introduce herself to us so if you go say hey there my name is addie two seconds okay or maybe three seconds because it's a bit longer we want to make it so that she can say it longer so when i press the flag she'll say hi there my name is addie and the first thing we want to do because it's a chatbot we want to make sure that you know people want to talk to our chatbot and just like all our other chat bots we want to get addy to ask the person for their name and then remember their name as well okay all right so let's try that so last time we did this we didn't store the name but this time we are going to store the name okay so we go into sensing and it's going to ask what's your name and wait after she asks your name we're going to get addy to remember the person's name for the rest of the session so go into variables and then we make a variable here we're going to make this variable called name and that is going to be what we store the person's name and then we go okay so what we did all the all that we did was we create a character create a background this is called addie okay she's going to be our addition robot uh i'm using abby the actual character name is called abby but our robot is going to be called adi okay because you add stuff it's what's your name and then wait and then we're going to set our name to be the answer okay so set name to 0 but instead of 0 we go back to sensing we put answer inside here that way adi will know our name for the rest of the session after we've stored the name from the answer what are we going to do is we're going to get addy to prompt us on our next step so imagine if you're talking to someone someone says hi i'm addie what's your name and then you say my name's orlando or my name is yolanda right and what's the other person going to say next person is probably going to say hi hi yolanda oh hi orlando uh nice to meet you let's play uh let's play edition okay so that's what our addie the robot is going to do so after he says the name then deluxe and then we say something or another couple of seconds and then instead of saying hi there my name is annie we're going to put two things together or three things together because we're going to say hi the person's name let's do two things again hide the person's name okay so let's go to operators and then we need to add two things together yes sorry we need to use join because um the adding is for numbers so i need to join highs and then space and then we put the person's name here so we go into variables and then we put the name okay once you have this here i want you to test it out make sure it's working so press go hi there my name is addie and then she asks what's your name i'm going to move my head away i say gary press enter and then she says hi gary so this is going very well so far and as you can see it has stored our name on this variable and we can see it on the top left hand corner if we want to remove it from the screen we can just untick the box next to name but it would still store the variable it just doesn't show okay we click the tick and it doesn't show it but she will still remember our name okay all right so now she's going to tell us what we want to do next so we go over here into sensing again she's going to ask you let's play some simple edition tell me the first number you want to add okay it's a lot of typing i know some some of the people here i might take some time to type so now she's going to ask you to type in your first number okay that you want to add so we're trying uh running the code again and see what happens hi there my name is addie what's your name and then i can go sarah let's play simple addition tell me the first number you want to add yeah i don't need a comma there tell me the first number you want to add okay and then you type in your number all right so let's have a look first number you want to add so first thing is we're going to add uh put the first number as a variable okay so we go into variables and then we'll make another number okay we call i mean another variable we call it first number okay first number uh yep so uh yeah yolanda's thinking about using the random block so yeah we'll use the random block at another stage that's a good thinking so new variable name is called first number and then we press ok now what we're going to do we're going to store the answer as that first number so we go set first number to zero but instead of zero we put in answer and then i think you know what to do next who wants to raise the hand and tell me what to do next if i want to get now the second number because we want to add two numbers together we want to tell you tell addy two of our numbers and then we get her to add it together for us so we make another variable we call it second number so here after we get our first number we say ask what is the second number and wait and then the same thing as we did for the first number we set the second number to be the answer this time second number to be the answer now uh this is what programmers like to do is to always see things um in something called debug mode okay and debug mode means to see all the variables and see all the information going in and out of our program so that we know what's working and what's not so this is good for debugging to see all of our variables displayed like this okay but at the end you're right uh after we know it's working then we untick all of our variables so that we hide all our variables and it doesn't uh block our view of our characters okay so make sure triple check that every uh that this word is working all three um things are populating so let's do it one more time name i'm going to go orlando hi orlando play some simple addition tell me the first number you want to add 11 and then see first number has turned into 11. what's the second number six yeah and it's added all our numbers together correctly next step we are going to make it so that adi actually adds those numbers together and tells us the answer what we do need is her to actually be saying something so say something like this oh so she needs to say the answer right so maybe she needs to say um and then we go into operators and then she needs to join two things together she needs to say the answer is and then the actual answer right so yeah so we're going to join two things together apple and banana but instead of apple and banana we're going to enjoy the answer is and then it's going to say banana but instead of banana we're going to join two different things together we're going to join our answer together the answer is and then we put in something plus something see yeah something plus something symbol over here right the answer is and then we go back into our variables and then we plug in our first number and our second number now let's see if that works properly hi there my name is addie what's your name going to say my name is stephanie it's a simple edition tell me the first number you want to add i'm going to go 12. what's the second number 14. and then she goes the answer is 26. and you see how there's no gap between is and 26 that means that we just need to put a space after the answer is okay that way it will put a space in between the answer is and the actual answer let's try one more time and this time i'm going to try and test it with some bigger numbers addy introduces herself my name is lucas hi lucas say some simple addition tell me the first number you want to add 562. what's the second number you know 123. and then she says the answer is 685. wow addie is really good at maths now we know that adi is going to be really good at maths okay but now is going to be the fun part now we're going to get addy to test you with some maths because addie is going to answer whatever we want two numbers adding together and then she is going to add ask us to add two numbers together and give her an answer and then she will tell us if it's correct or not okay so that is going to be our challenge so uh we're going to get the uh adi to ask us again okay but before we do that uh we're going to get the person ready to get the player ready okay so let's go to looks again and say uh now it's your turn to add okay because not many people will will expect that addie is going to ask us something right okay now it's your turn to add eddie loves her maths she loves her edition and she wants to test us now so let's set first number to a random number first number and then we go into operators and then go pick random uh let's do 10 to 20. okay first number is going to be between 10 to 20. and then i set a second number set second number is going to be another random number between 10 and 20. okay so after we have asked adi for her answer she's going to ask us for our answer and she's going to have two numbers in her mind for first number and second number we're not sure what that number is well we will know because it's going to show up on our variable here on the screen right but in the final game we're going to hide it so that it's a bit more of a challenge we're also going to set at his answer okay so i go into variables and then we create another variable and we call it um addie answer why do i want to call it addy answer because i don't want to get it mixed up with the normal answer that we usually have for the sensing block that's why i want to create one called addi answer so that we don't get mixed up with the other answer block and then we set addy answer to begin first number plus second number so you got operators and then we go here first number plus second number okay so let's try that let's test this out to make sure that all these uh readouts especially at the answer is going to be correct okay so first of all we start the game my name is addie jeanine yeah helen hi helen let's play some simple addition tell me the first number you want to add 20 what's the second number 15 the answer is 35 and then she goes now it's your turn to have now she has randomized two numbers 20 and 14 and addie's answer is 34 which is correct right so now all we have to do is actually do the code to populate and make sure that this is working properly okay so now now it's your turn to add now she's going to say it okay go into sensing and then she goes ask and wait this is going to join two three four things together so we need to go operators and then we need to go join um hold on ah here we go join uh what is so she's going to ask you what is and then we want to put the number and then plus and then another number so that's three things so i put in another joint what is first number and then space plus space oh no i gotta put in put in another join here so three joins see how it says join join join there you go put three joins in what is and then we got to put in a space after what is and then we're going to put in the first number and then we say plus space and then the second number and wait so now addie is testing us she says saying what is first number plus second number and then finally to finish the game we have an if else block if else if our answer is equal to add the answer then we are correct so we're going to here and then we get an answer operator if our answer is equal to addy answer because addy answer is the sum of her random numbers okay here at the answer then addie's going to congratulate you and say well done okay looks and then she says well done for three seconds but if it's not then she will say [Music] that's not right okay and so we have our math challenge game okay if you want to make it a challenge you got to make sure you get rid of addy answer okay so go into variables and then untick addy answer so that you don't see the answer okay and then you can also get rid of all the other other things as well but while you're testing let's keep adding answer here so that we can test it all right i'm going to leave the code here so that you can see it it's a lot of a lot of code let's go hi there my name is addie what's your name i'm going to say my name is michael hi michael play some simple addition tell me the first number you want to add 30. what's the second number 16. then she says the answer is 46 which is right now's your turn to add what is 12 plus 20 now i'll try to answer it correctly first i got 32 and she says well done yes right let's try it again and then let's answer it incorrectly okay that's number one to add let's test adding let's get 532 it's the second number 73 655. she's really quick with her addition isn't she now it's your turn to add 14 plus 15. i'm going to say the wrong thing i'm going to say it's 5. and she says that's not right which is exactly exactly right you want to make it bigger more of a challenge now if everything is working then we delete i mean not delete remove the check boxes for all our variables especially at the answer and then also we can make it a bigger random number so instead of 10 to 20 let's make it 10 to say 100 and then the second number sent to 100 as well and that way it's going to be a bit more of a challenge when she's asking the player all right this is addy what's your name let's say sam hi sam play some simple addition tell me the first number you want to add oh she's really good at this so i'm going to put in massive numbers number 1254. and then she can answer it straight away 5937 how's your turn to add what is 90 plus 84 oh man i think it's 174 well done all right so that is our chatbot huddy
Original Description
Enjoy this preview of the Coding course from Creator Academy.
Challenge Addy to a mathematic's game in this fun Scratch 3.0 coding lesson!
For more in-depth science, building and coding on this subject, visit www.creatoracademy.com.au
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Creator Academy Australia · Creator Academy Australia · 49 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
▶
50
51
52
53
54
55
56
57
58
59
60
LEGO Wedo 2.0 Kangaroo and Joey Demonstration
Creator Academy Australia
LEGO Wedo 2.0 Koala Demonstration
Creator Academy Australia
LEGO WeDo 2.0 Eagle vs Rabbit Demonstration
Creator Academy Australia
Animatronic Australia: The Kangaroo
Creator Academy Australia
How Semiconductors Work: 3D Animation
Creator Academy Australia
LEGO Wedo 2.0 Koala
Creator Academy Australia
First impressions and unboxing First Lego League: Into Orbit 2018
Creator Academy Australia
FLL Into Orbit Team Ranking Gears talks about Artificial Gravity
Creator Academy Australia
FLL Into Orbit team Ev3lution discusses isolation in space
Creator Academy Australia
PI3-BOT (Pie Bot) Prototype
Creator Academy Australia
Dynamic display stand for LEGO Bugatti Chiron (preview)
Creator Academy Australia
Creative Kids TV announcement featuring Creator Academy
Creator Academy Australia
LEGO WeDo 2.0 Guided Lesson: Milo
Creator Academy Australia
LEGO SPIKE PRIME: Turtle Prime Demonstration
Creator Academy Australia
LEGO SPIKE PRIME "Wheelchair Prime"
Creator Academy Australia
10 Reasons why EV3 is SUPERIOR to SPIKE Prime
Creator Academy Australia
Your first launch after installing Python: Python for Kids Webinar Highlight
Creator Academy Australia
What is "Sharpening the Saw": Python for Kids Webinar Highlight
Creator Academy Australia
Why We Use Comments: Python for Kids Webinar Highlight
Creator Academy Australia
Build a Scratch Dinosaur Park (Full Lesson)
Creator Academy Australia
Scratch 3.0: Cat and Mouse Game Stream (Krunal)
Creator Academy Australia
Python Tutorial: Make a Toilet Paper Calculator (Full Lesson)
Creator Academy Australia
Scratch 3.0 Tutorial: Making a chatbot that plays 'heads or tails' (Full Lesson)
Creator Academy Australia
Getting Started with MicroPython on SPIKE PRIME (old)
Creator Academy Australia
Easter Egg Game Tutorial in Scratch (Full Lesson)
Creator Academy Australia
Accessing Weather API with Python (Highlights)
Creator Academy Australia
Accessing Translate API with Python (Highlights)
Creator Academy Australia
Scissors, Paper, Rock with Scratch 3.0 (Highlights)
Creator Academy Australia
Making a really scary game with Scratch 3.0 (Highlights)
Creator Academy Australia
Making a Lemmings game with Scratch 3.0 (Highlights)
Creator Academy Australia
Space Navigation Game in Scratch (Highlights)
Creator Academy Australia
Scratch Supercat Game (Full Lesson)
Creator Academy Australia
Introduction to Robots with LEGO Wedo 2.0 (Full Lesson)
Creator Academy Australia
Getting Started With LEGO Spike Prime (Full Lesson)
Creator Academy Australia
Scratch Walk Cycle Animation Tutorial (Full Lesson)
Creator Academy Australia
Building a Scissor Lift with LEGO Simple Machines (Highlights)
Creator Academy Australia
EV3 datalogging RPM challenge (highlights)
Creator Academy Australia
Learning about buses with LEGO (Full Lesson)
Creator Academy Australia
Make "Flappy Bird" in Scratch 3.0 (Highlights)
Creator Academy Australia
"Memory Arrows" game with Scratch 3.0 Lists (Highlights)
Creator Academy Australia
Learning about Gear Ratios with LEGO Simple Machines (Highlights)
Creator Academy Australia
Scratch 3.0 Bouncing Ball with Stretch, Speed and Acceleration (Full Lesson)
Creator Academy Australia
LEGO SPIKE Prime Order Tracking Robot (Highlights)
Creator Academy Australia
Scratch 3.0 Race Guesser (Full Lesson)
Creator Academy Australia
How Banks Work - a quick explanation for kids
Creator Academy Australia
SPIKE Prime Safe + importance of passwords (Highlights)
Creator Academy Australia
Combination Safe Coding Guide with LEGO SPIKE Prime
Creator Academy Australia
LEGO SPIKE Prime Parcel Scanning Robot
Creator Academy Australia
Building "Addy" the Addition Chatbot
Creator Academy Australia
SPIKE 2.x PID Balancer with Scratch for SPIKE Prime / 51515: Gyro Girl
Creator Academy Australia
What is Procedural Programming
Creator Academy Australia
Zombie game in SCRATCH (plus horrifying zombie facts!)
Creator Academy Australia
Swarming Bugs Scratch Game
Creator Academy Australia
LEGO Mindstorms/SPIKE Prime Scanner and Printer
Creator Academy Australia
Fishing Game with SCRATCH (For Fathers Day!)
Creator Academy Australia
Measuring Paper Plane Speed with SPIKE Prime Line Graphs
Creator Academy Australia
Comparing Mindstorms Robot Inventor and SPIKE Prime
Creator Academy Australia
Code a 'Knock Knock Joke' game in Scratch 3.0
Creator Academy Australia
Creator Academy Australia Live Stream
Creator Academy Australia
Discovering LEGO Mindstorms/SPIKE Gyro Pitch Deadzone
Creator Academy Australia
More on: Visual / Block Coding
View skill →Related Reads
📰
📰
📰
📰
The no-code AI business stack that earns $5k/month on autopilot
Dev.to AI
GitHub’s April Changelog Exposes the Private-Repo Cost of Instant Reviews
Medium · AI
AI Did Not Kill Freelancing. It Changed What Clients Actually Pay For
Dev.to · Alcora
25 Best AI Tools in 2026 to Boost Productivity, Create Content & Make Money Online
Medium · Startup
🎓
Tutor Explanation
DeepCamp AI