code and output for 2nd Project