code for coursers programming assinment 2