In mode P, the camera automatically adjusts shutter speed and aperture for optimal exposure. You can, however, choose other aperture and shutter speed combinations that will produce the same exposure: this is called "flexible program". Choose programmed auto for snapshots and in other situations in which you don't want to miss a shot.