Baseball is a team game played by two teams consisting of nine active players in each. The teams play alternately…