Sample code written for assignments.