Complete the codes and slides for Sec. 2.