My reaction when trying to find out the correct way to program the second part of this quiz:
For this Quiz we had two assignments. In the first one, we had to make a program that let the user know if the word submited is a palindrome or not. I used the [:: -1] to reflect the complete word and then compare the reflection with the original word. I also used the s.lower, so the program ignores capital letters. However, as a cool feature, I made the program ignore spaces since there exist palindromes with spaces. Such as the famous spanish sentence “Anita lava la tina”.
Here is how it looks, and here is how it looks in my GitHub.
The next step was to do a program similar to the WSQ10. Create a list were the user submits the numbers and play with those numbers. However, the difference was that the operations would only considerate the numbers that are divisable by 3, no remainder.
Several people did this by let the user submit the list as a string separated by commas. That is why I had the reaction of the picture. Yet, with the help of Arturo Fornes, I managed to make eat simplier since he assisted me by correcting what I had done. Just a simple conditional were if i % 3 = 0 then the program appends that number to a separate list. Then I print the list to let the user know which ones are going to be used for the sum. Finally, just make a simple sum then print it. Such as this:
Let’s talk about this 80’s oldie. “Maneater” by Daryl Hall & John Oates. A song I first listened to in Metal Gear
V: The Phantom Pain. It is an entertaining song while playing in the open world of this game.
Quiz 05 by rhcpalmarichie is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.