For a molecule with the formula AB2 the molecular shape is

CO2 is linear.

To determine the molecular shape of a molecule with the formula AB2, you need to follow a few steps:

1. Identify the central atom: In this case, "A" is the central atom, and "B" is the surrounding atom.

2. Determine the electron geometry: To find the electron geometry, count the total number of electron groups (bonding and lone pairs) around the central atom. In this case, there are two bonding pairs ("B") around "A", giving a total of two electron groups.

3. Determine the molecular geometry: To find the molecular geometry, consider only the atoms (not the lone pairs). In this case, the molecular geometry is determined by the two surrounding "B" atoms.

There are several possible molecular geometries for AB2:

- Linear: If the two "B" atoms are directly opposite each other, the molecule has a linear molecular shape.

- Bent: If the two "B" atoms are not directly opposite, the molecule has a bent molecular shape.

The exact molecular shape will depend on factors like the electronegativity and size of the atoms involved.

To fully determine the molecular shape, you may need additional information about the specific atoms involved in the molecule.