Can someone help me with what p and n type is? i have no idea.
It's requires some Chemistry to fully explain but you do Chem so it doesn't matter.
~ Some semiconductors (such as diodes and transistors) are composed of a lattice of silicon or germanium atoms, which have four unpaired valence electrons and form a stable octet (outer shell of

of valence electrons by forming 4 covalent bonds with four other atoms in the lattice
~ At room temperature, there is negligible current flowing through the semiconductor, as the bonds which hold electrons in place in the lattice are too strong
~ However we can increase the conductivity of a semiconductor by doping it, which is to replace some of the silicon/germanium atoms in the lattice with other elements.
~ We create an n-type semiconductor by placing phosphorus atoms into the lattice (doping the semiconductor with phosphorus). Phosphorus has 5 valence electrons, hence when it forms 4 covalent bonds in the lattice, there will be 9 valence electrons when only 8 are required to form a stable octet. The one extra valence electron is bonded weakly to the atoms in the lattice, and hence it becomes a delocalised electron: It is able to flow freely through the semiconductor.
~ We create a p-type semiconductor by placing silicon atoms into the lattice (doping the semiconductor with silicon). Silicon has 3 valence electrons, hence when it forms 4 covalent bonds in the lattice, there will be 7 valence electrons when 8 are required to form a stable octet. The absence of the single electron required to form a stable octet produces a hole, which valence electrons from neighbouring atoms in the lattice are able to flow freely into. However when a hole in the valence shell of Atom A is filled by a valence electron of Atom B, the hole is then transferred to the valence shell of Atom B as Atom B is now lacking an electron. The hole then moves to Atom C, Atom D, and so on. In this way the hole moves through the lattice.
It's like a neat single-file line of people. If the person in front moves forward, there is now a gap between the 1st and 2nd person. If the 2nd person then moves forward to catch up to the 1st person, then the gap is then transferred to between the 2nd and 3rd person. By the repetition of this process, the gap is eventually able to find its way to the other end of the line.
~ When you connect an n-type semiconductor in a circuit, the electrons flow towards the positive terminal of the battery
~ When you connect an p-type semiconductor in a circuit, the electrons flow towards the positive terminal, hence the holes flow towards the negative terminal.