1°- In series LED circuit.
2°- Parallel LED circuit.
The resistor is calculated whit following formula:
Vi = 7V - > Total voltage.
Vf = 2V ->the volts of each LED (2V).
Vf tot = 6V - > Total voltage calculated from the sum of the volts of each LED (6V).
If = 20mA -> 0.02A , the current of each LED.
R = Vi - Vf tot / If = 7V - 6V / 0.02A = 50Ohm
*it is a good rule to choose a larger resistance very close to the result.
I chose a 56 Ohm resistor