Hey so… palindromes,
So I didn’t know this before last week, but a palindrome is a word or phrase that reads the same backward or forward, such as kayak or racecar.
Anyways, Angel and I made a program during Ken’s class that takes user input, splits it into words, and feeds back which ones are palindromes and which ones are not, and it works YAY!
Since there’s no built in reverse function in Python strings, we created a function that reverses a string by slicing it. If a negative value is used for the step in slicing a list, the slice is done backwards. Using [::-1] as a slice is a common and idiomatic way to reverse a list. More about this at http://stackoverflow.com/questions/931092/reverse-a-string-in-python.
So yeah, check out our code at https://github.com/cpvp20/palindrome/blob/master/palindrome.py
sources:
http://www.quickmeme.com/meme/3u0jqj
http://giphy.com/gifs/dancing-fresh-prince-of-bel-air-carlton-pa37AAGzKXoek
October 27, 2016 at 11:12 am
And why a Tacocat??? why are you against cats???
But very nice
LikeLike