Not exactly
The power supply dosen't just rely on capacitors or resistors
but also rely on diode and transistor
the idea is this we use the diode or transistor to make AC as semi DC(but not pure DC)so now we need a capacitor to smooth(semi DC)to be pure DC
(AC doesn't work with the computer we have to get DC)
after that the resistor can play the distribution very well
by the value and the shape( parallel or series ) of resistor
keep in mind there are many ways to do this
but this is the main concept
المفضلات