programming assignment of CompData Week2