The effects of cross section flattening distortion of zigzag (n, 0) single wall carbon nanotubes (SWNTs) on their electronical and mechanical properties were investigated through first-principles calculations. For semiconducting zigzag› (3n+1, 0) or (3n+2, 0) nanotubes, electronic bandgaps first decrease leading to semiconductor-metal transition and then reopen leading to metal-semiconductor transition as a function of mechanical flattening of the nanotube cross section. Similarly, metallic zigzag (3n, 0) nanotubes open their bandgap which form metal-semiconductor transition after a certain flatteness of the nanotube cross section. The detailed mechanism of how and why the bandgaps change was studied through density of states analysis. The total energy as a function of mechanical deformation shows different quardratic behavior in the different electronic transition domain which result slightly different Young's modulus in different regime. The results obtained by simulation clearly indicate the mechanical and electronical properties coupled together when mechanical deformation was induced and give the potential application to develop diverse nano electro mechanical systems.