In this Code Along Jr. episode, our host Kalani teaches you how to create an AI chatbot in Scratch! 🤖 Learn to create your robot’s brain 🧠 and teach your robot what questions to check for and how to respond to those questions! Also, if your robot doesn’t know the answer to a question, you’ll learn how to teach it more answers. At the end of the episode, you’ll have a fully functional robot to interact with!
Skip to the good stuff:
00:00 Introduction
01:45 Change sprite
02:03 Add backdrop
02:34 Add event block
02:42 Add the forever control block to keep the chat going
02:51 Add the ask sensing block inside the control loop
03:08 Create variables to begin creating your robot’s brain
03:43 Add the “found” variable to your code; make it false
03:58 Add the “prompt” variable to your code
04:10 Add the repeat control block, “length of” variable block, if /else control block, and contains operators block to make your robot search for answers
04:56 Add the if/not control block to your code to see if your robot knows the answer
05:25 Add the “add to” variable block to teach your robot answers it does not know
05:59 Add the say block from the looks section to make your robot shout out loud the answer
06:06 Add the “found” variable to your code; make it true
06:16 Add the “item” and “prompt location” variable blocks to make your robot search each item in the prompt list and return the response to your question
06:50 Add the “change by” variable block to teach your robot to move onto the next item if it does not know the answer
07:06 Add the if/then control block, greater than 50 operators block, “found” and “add to” variable blocks, answer and ask/wait sensing blocks, “add to” variable block to teach your robot more answers
07:45 Review your code
08:24 Clean up your screen
08:48 Test your code and ask your robot questions
09:43 Save your project
About Code Along
Everyone’s invited to Code Along with Black Girls Code. It's a free, video-based coding academy by Black Girls Code in partnership with GoldieBlox. Here, Black girls, young women, and youth of all genders receive tangible, educational, and entertaining tutorials to spark interest in computer science and tech. With fun projects and simple step-by-step lessons, this series encourages you to code along while our expert coders make a game, a song, an animation, a story, and an AI chatbot using Scratch. In these 15-minute-or-less episodes, Code Along reaches millions of girls and provides them with the tech skills and confidence to build brighter futures. Speaking of future innovators — we also chatted with Googlers and toured a Google office space. Learn a new skill, discover a new role model, and Code Along with us.
#howtocode #blackgirlscode #goldieblox #codingtutorial #codealong #scratch
Ещё видео!