Pupils taught on dangers of premature sex and smoking