Scratch
Intermediate
60 mins
Teacher/Student led
+125 XP
What you need:
Chromebook/Laptop/PC or iPad/Tablet

Username Generator

In this lesson you will create a robot that first asks you some questions and then generates a username for you based on your answers!

Teacher Class Feed

Load previous activity

    1 - Create a new Scratch project

    Create a new Scratch project and delete the cat sprite.

    2 - Add the Retro Robot sprite

    We're going to use a robot sprite to ask you some questions. The answers to these will help make your username!

    Once you've added the 'Retro Robot' sprite form the library, drag it to the middle of the stage area.


    3 - Create a 'user name' variable

    We will need to create a variable called 'user name' to store the text of our username as we build it.

    When you create a variable, a small orange rectangle appears in the stage area that displays the current value of that variable. We don't need to this display so we're going to add the following code to hide it:

    when green flag clicked hide variable [user name v]

    4 - Say the instructions

    Our robot is going to give the instructions for using the username generator. Add the following code at the bottom of the 'when green flag clicked' blocks of code:

    when green flag clicked say [I am the random username generator robot!] for [5] secs say [To get a username, answer these questions...] for [5] secs


    123learn · Online learning platform

    Unlock the full learning experience

    You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.

    Hundreds of curriculum-aligned lessons
    Interactive activities in every lesson
    Printable resources & progress tracking
    Copyright Notice
    This lesson is copyright of Coding Ireland 2017 - 2026. Unauthorised use, copying or distribution is not allowed.

    Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at https://scratch.mit.edu
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more