exercises from programmingpraxis.com