The tadpole contains gills but doesn't have legs nor lungs.
however the adult frog contains the opposite. It has both lungs and legs but doesn't have gills. This is due to tadpole leaves in the water and the frog leaves on both land and sometimes in the water.