Day 11, Part 2: Electric Boogaloo

OK, I’m back for a short session.

First, a picture of my dog, Ajax. This one is from my old house in Ohio. He enjoys sitting and looking out windows.


Let’s continue on with the elseif command. If you remember where we left off, we did this to demonstrate control flow:

We can add in “elsif” to add more than one clause, such as:

I will admit to getting confused at this until I realized I had to leave the console because of something I did and restart it. I forgot to assign “foobar” back to “s” and I got errors. I went back, assigned “foobar” and it worked!

We can get a little deeper into Boolean variables using && for “and,” || for “or,” and ! for “not.” Take a look here:

You can see the first statement was not printed out since it was false. The others were true and it printed these to the screen.

OK, I am taking off again and will return later. My goal is to finish Chapter 4 tonight.