June 23, 2018

Get started at http://www.coderdojokc.com/today

Welcome to CoderDojoKC! Let’s get you started!

Looking for something to do? Practice your typing skills! Typing.io is a great way to keep your fingers nimble and learn where some of those tricky keys are located.

Are you working on the debugging challenge? Remix it here!

Last month’s Scratch presentations

Step One: Start Learning!

If you don’t know which programming language to start learning, we recommend Scratch (if Scratch is not to your speed, check out the typing.io link in the sidebar on the right).

You will need a parent or guardian’s help to create a Scratch login:

  1. Click “Join Scratch” in the upper right-hand corner of the Scratch site.
  2. Create a username that does not include your real name.
  3. Think of a password that you can remember easily. You should have your parent or guardian write this down and save it.
  4. Click “Next” and continue following the directions. You will need a valid email address (yours or your guardian’s) to continue.
  5. If you don’t have your own email address you can use
    dojostudent@kcwomenintech.org

Once you have a Scratch login, use the links below to build something awesome.

Step Two: Learn to Code

1. Need an email address to sign up for Scratch? Use dojostudent@kcwomenintech.org (We can confirm the account for you, just ask a mentor!)

2. Are you brand new to coding? Start with Codecademy (recommended for 13 years & up) or Scratch (recommended for 12 years & under).  Want to try building your own phone application? Check out App Inventor! Be sure to create an account and write down your username and password so you won’t forget!

3. Do you have a little coding under your belt? Are you ready to learn more? Check out these fun games:

4. Were you working on a project from our last session? Feel free to continue on that, and ask mentors if you need any help!

5. Get started on the new project. We can’t wait to see what you create!

Step Three: Check Out the Projects

Mastery – Feeling masterful? Check out the requirements for our mastery badges. You can earn cool pins!

Today’s theme: Summer Fun

This is our first CoderDojo of Summer! What are fun things that you enjoy doing this time of year? Do you spend time with family and friends? Do you play games?

A dance of Spring and Summer

Today’s concept: Making Decisions — If-Then-Else

When we are faced with a simple decision, how do we know which choice to make? Let’s say that your family has all of its toothbrushes in the same cup in the bathroom. How do you know which is yours? Do you have the kid-sized toothbrush with the red handle or the one with the Spiderman handle?

When I was a kid and my parent yelled at me, “Eric, get in here.” I knew that I had about 60 seconds to get to them; however, if they yelled, “Eric Aloysius, get in here right now,” I knew, since they used my fake middle name, that I was in deep trouble and I had roughly 1.5 seconds to appear before them. In my head, I thought, “Given that my parent yells my name. If they use my middle name, I had better drop whatever I’m doing and run to them. Else, I can gently stop whatever I’m doing and quickly walk to them.” So, when a parent yelled my name as “Eric Aloysius,” did I walk to them or did I run to them?

In code, this might look like:

var name;

if (name === "Eric Aloysius") {
  me.dropEverything();
  me.runToParent();
} else {
  me.saveGameOrBookmarkBook();
  me.walkToParent();
}

You might notice in the code above, that what happens after I’m called depends on the truth of the name including my middle name or not. This kind of truth is called a “boolean.” A boolean value is either true or false (also, yes or no). If-statements, such as the one above, rely on booleans. Let’s look at another boolean.

Have you ever made a deal with your parents that if you get a certain grade or score on a test, you can celebrate by doing something special like going out for ice cream or pizza? Let’s say that you were required to get a 90% or better on your test in order to celebrate. In this case, the boolean value is “score >= 90.” Your score is either greater-than-or-equal-to 90, or it isn’t.

var score;

if (score >= 90) {
  me.celebrate();
} else {
  me.scrubFloor();
}

If I were going to scrub the floor no matter what my score, my code might look a little different:

if (score >= 90) {
  me.celebrate();
}

me.scrubFloor();

You can also use several if-statements together:

var score;

if (score === 100) {
  me.say("WOO!");
} else if (score >= 90) {
  me.say("Woo!");
} else if (score >= 80) {
  me.say("Woo.");
} else if (score >= 70) {
  me.say("ugh");
} else if (score >= 60) {
  me.say("eep!");
} else {
  me.say("Nononononononono");
}

You can also check against several booleans (truths) together:

var score;
var subject;

if (score < 60 AND subject === "spelling") {
  me.askTeacher("Do you offer test retakes?");
}

As you can see from these, examples, there are several ways to use if-statements to make decisions and move your code along.

Examples in Scratch

Step Four: Show Off!

Did you create something awesome based off of today’s theme/concept? Come present it on stage! Presentations will start at 11:30 am. At 11:00, come see Mentor Eric to get a place in line to present. Scratch projects that will be presented will be added the CoderDojoKC Studio by a mentor.

Presentations must include at least one if-else statement.

**Presentations may not contain any politics, violence, gore, or bad words. (And we’re counting “sucks” as a bad word!)