Pieces of code from Programming Class