“Grasshopper – Order of operations” – Codewars

“Grasshopper – Order of operations” – Codewars

Today I completed the “Grasshopper – Order of operations” kata on Codewars!

Looking at the code and what I had to do, I at first was struggling over how to make the code output 32 without changing the number or operations used. Then, as I was thinking it through, I realized I could use parentheses to change the result. I tried the code and it worked!

Memorial Day

Memorial Day

Memorial Day is a day to remember those who have died for our country and for our freedom. We want to thank all the people that have sacrificed their lives for the freedom of our nation. We should never take our freedom for granted.

Quarter of the year – Codewars

Quarter of the year – Codewars

Today I completed the “Quarter of the year” kata on Codewars!

Looking at the code, it was easy to see what to do: if the month(a number) was at least equal to 1 but smaller than 13, output a number from 1-12. Knowing this, I typed the code and it worked

How many lightsasbers do you own? – Codewars

How many lightsasbers do you own? – Codewars

Today I completed the “How many lightsabers do you own?” kata on Codewars!

It didn’t take long to see what to do: if a given name is equal to ‘Zach’, return 18; otherwise, return 0. Knowing this, I wrote the code and it worked!

And don’t forget: don’t hog all the lightsabers!

Returning Strings – Codewars

Returning Strings – Codewars

Today I completed the “Returning Strings” kata on Codewars!

Looking at the code, I could easily see what to do: write a return statement that returns a string in this format: “Hello, <name> how are you doing today?” Knowing this, I wrote the statement and it worked

Will you make it? – Codewars

Will you make it? – Codewars

Today I completed the “Will you make it?” kata on Codewars!

The code called for a function that took the miles away from a gas pump, a car’s miles/gal, and how many gallons of fuel are left. Based on this data, it should return true if the car would make it to the pump and false if otherwise. So I went into the code, wrote the function, and it worked!

Bug Zero Icon

OUR NEWSLETTER