Asked how she believes terrorism can be stopped, Malala Yousafzai started with a list of things she doesn’t think will work: drones, guns, bombs, troops, wars.

Then she pointed to what she thinks could: books and schools.

“Investment in education is crucial," she told a Salt Lake City audience Thursday. "That is the one way to prevent extremism.”

The 21-year-old captured in that answer just how she became a celebrated activist and the world’s youngest Nobel Peace Prize laureate. She spoke her mind. She advocated for girls' education and was attacked for it by the Taliban.

She hasn’t stopped.

“I had only two options: whether to speak out or not,” Yousafzai said. “If I did not speak out, that meant things would be worse. If you want to see change, if you want this world to be a better place, then you have to do something.”

Her remarks, part of a 40-minute moderated conversation, came on the last of a three-day conference hosted by Pluralsight, a Utah-based company that teaches computer and coding skills through online courses. This year’s conference focused on expanding technology and education to underserved communities and more than 2,000 attendees raptly watched Yousafzai’s keynote, clapping loudly and nodding in agreement.

A few wiped away tears as she described how militant leaders banned schooling for girls in her region and how a gunman shot her in the head in 2012 after she defied the policy. She was flown from her home in a Pakistan that had slid into extremism to Britain, she said, for surgery to remove the bullet that had grazed her brain and lodged in her neck. There, after a few months of recovery, she started an organization to fund education programs for girls worldwide.

Yousafzai’s father, Ziauddin, sat in the front row Thursday in the Grand America’s ballroom and cheered her on. She joked that he was a feminist before he knew the word for it.

“He allowed me to speak out,” she said. “He’s the one who believed in me always.”

A year before the attack, when she was 14 years old and already well-known in the region for her advocacy, Yousafzai got a call from a girl she had attended school with, she said. The girl’s father had married her off. It shocked Yousafzai and cemented her mission, she said, and deepened her appreciation for her own family.

“She had a dream as well,” Yousafzai said. “She wanted to be a doctor.”

The young activist talked about a girl she met in Congo, who walked miles every day to go to class. She mentioned a 14-year-old in Iraq who ran away from home so that she could attend school. “These girls are brave and they are strong and they don’t give up. We should not give up either.”

She asked that companies like Pluralsight invest in kids in Pakistan and Afghanistan, help them build classrooms, teach them how to use computers, and empower them to finish school.

And girls, she added, should be taught that they have a voice.

“It’s more than just reading books and writing,” Yousafzai said. “It’s about empowerment. It’s about emancipation.”

Among the more serious moments, Yousafzai made the audience laugh with her candid, off-the-cuff remarks. She’s now a student at Oxford University and said she couldn’t say everything she’s doing in college because “my father is here.” She said she listens to Taylor Swift and Beyoncé songs on a loop for two weeks until she doesn’t like them anymore. She said she showed comedian David Letterman around England and had to remind him to be “a little more grown-up.” She said Utah’s Wasatch range is “just a copy” of the better version of mountains in Pakistan.

She returned to the country in March for the first time since she was attacked. Her helicopter landed in Swat Valley on the same pad where she was airlifted out six years ago. She visited friends and family and went to her old bedroom, which still had her trophies and her books.

It’s the place where she first asked herself how terrorism might be stopped.