Before lunch, 24/3=<<24/3=8>>8 students were photographed.
Then 8+10=<<8+10=18>>18 have been photographed by gym class.
So 24-18=<<24-18=6>>6 remain.
#### 6