namagic list exercises

by Omar Kashef

08 Feb 2016

List Ex 1

This one was actually pretty fun, mostly cause I was thinking about playing fruit ninja while I was chopping the first and last elements of this list. Once I realized that pop() autmoatically removed the last element, this ran like it should.

List Ex 2

I believe what was not properly done was including an else statement to provide the user some feedback if nothing happened.

List Ex 3

Removed the second if statement and used the logical operator “and”.

Omar is a second-year graduate student studying both Public Administration and Information Science. I'm an avid reader (current favorite books: Alice in Wonderland and Clockwork Orange) and I still play DDR. Find Omar Kashef on Twitter, Github, and on the web.