You are given a sentence in English. Your job is to translate the English sentence into Spanish.

Why did Nikola Tesla have to invent the alternating current that powers the lights in this building or the city that we're in?
¿Por qué Nikola Tesla tuvo que inventar la corriente alterna que alimenta las luces del edificio o de la ciudad que habitamos?