(Second script, yo!)
I was able to build the second script, which in a way, is what I consider a real script. I just simply call it the Numerology app.
I actually have heard of Numerology before, but I never really got myself more familiarized with it. Numerology is another form of fortune telling, like astrology and tarot cards, except they’re using one special number derived from your date of birth. The number you get from your birthdate will determine your personality, in one way or the other.
The screenshot above is me testing the numerology app, making sure that everything works just as I intended. I used my birthday, and my result is that my Numerology number is 2. I could keep this in mind, should I decide to entertain myself, visit a psychic, and provide me a fortune based on the #2.
For today’s lesson, we learned another familiar programming concept: conditional statements 1 and case statements 2. It’s a lot easier than I thought with Ruby, and I really had fun doing the exercises, as well as building this Numerology app. I gave a bit of a personal touch to it.
To create the Numerology app, here is my code:
Last, but not least, we always close our statements with the word
end. That’s it for today’s lesson! Now I can rest until tomorrow’s lesson. 📻
July 19, 2016 @ 7:05 pm
Yay for getting more script experience!
July 19, 2016 @ 9:13 pm
Yup! But I’m a bit scared because it’s going to get a lot harder and complicated later on. I mean, when I look at this particular script, I feel as if there could be a better, cleaner, shorter way of writing all of that, like shortcuts, you know? Maybe we’ll eventually learn about that later on. 😀