contestada

Which sentence is written correctly?
•When driving, it requires attention.
•Pay close attention while driving.
•While driving, close attention is necessary.