If u are actually doing this circuit in lab..u can use an LM317 (a variable voltage regulator..see datasheet)..or if u want a fixed o/p voltage u can use a corresponding zener diode of req reverse vtg rating...The simplest soln of all would be to use a voltage divider circuit to get the req o/p vtg across R1 & then allow the 12V-o/p vtg drop across R2..However this will the most inefficient circuit as power deliverd to R2 is simply lost as heat...
This can be achieved by using an LM317 as Mr. Possible Soln mentioned.
Else you can go for a simple buck converter in case if you need higher current....
If you want to know about the buck converter pls let me know......
The LM317 is the easiest method and has decent regulation. But if your teacher doesn't allow for ICs, use a Series Pass transistor as a regulator; it's controlled by a pot to get your variation. If you need this solution, let me know.