answers for some simple programing problems