TacocaT

What is TacocaT?

When you read that word, TacocaT, what is the first thing you notice? That both T's are capitalized and their location within. This should lend an idea of what this exercise is all about. Have you thought of it yet?

That's right

It's a Palindrome


Test It Out

What is a palindrome?

As defined by Webster's Dictionary, a palindrome is "a word, verse, or sentence (such as "Able was I ere I saw Elba") or a number (such as 1881) that reads the same backward or forward". Myself, I think of the classic racecar when considering them.

What does a palindrome have to do with coding? Well, consider this. In coding, we use these handy procedures named functions to interact with a user's input. Whether you want to create an account, solve mathematical equations, or sign up for email updates, there will be a function being carried out behind the scenes.


Functions & Palindromes

If you were given a word or phrase, and told to determine if it were a palindrome, think about how you would go about this process. Simply put, you would take what you were provided (we'll call this the input) and write it backwards, letter by letter, and compare with the original as you go. That's the same approach a function would take.

A function takes an input and performs a serious of tasks through if statements. If statements are appropriately, as they take a variable and compare it against any assigned parameters that it was instructed to look for. If the conditions are met, then the accompanying function will be carried out. This could mean performing an action, or not not performing it. That is up to the programmer.

Check out the function(s) here.