In physics, what is the primary function of an electrical generator?
a. To convert electrical energy into mechanical energy
b. To convert mechanical energy into electrical energy
c. To store electrical energy for future use
d. To amplify electrical signals