Exercise number two for my programming 101 classes