LONDON — A year ago, Malala Yousafzai was a 15-year-old schoolgirl in northwest Pakistan, thinking about calculus and chemistry, Justin Bieber songs and “Twilight” movies.

Today she’s the world-famous survivor of a Taliban assassination attempt, an activist for girls’ education — and a contender to win the Nobel Peace Prize later this week.

And the European Parliament announced Thursday that Malala won the $65,000 Sakharov Award, Europe’s top human rights award.

It’s easy to forget she is still a teenager, and now a long way from home.

The memoir “I Am Malala” goes some way toward redressing that balance. Published around the world on Tuesday, the book reveals a girl who likes “Ugly Betty” and the cooking show “Masterchef,” worries about her clothes and her hair, but also has an iron determination that comes from experience beyond her 16 years.

The book, written with the British journalist Christina Lamb, recounts Malala’s life before and after the moment on Oct. 9, 2012, when a gunman boarded a school bus full of girls in Pakistan’s Swat Valley and asked “Who is Malala?” Then he shot her in the head.

The shooting is described briefly but vividly in the book, which is briskly written but full of arresting detail. “The air smelt of diesel, bread and kebab mixed with the stink from the stream where people still dumped their rubbish,” Malala remembers.

Around that pivotal event, the book weaves Malala’s life story into the broader tale of her home region of Swat, a remote, mountainous region near the Afghan border. She says it is “the most beautiful place in the world,” but it’s also a crossroads traversed for millennia by armies and invaders.

Into this valley, in the years after 9/11 and the U.S.-led invasion of Afghanistan, came the Islamic fundamentalist Taliban. The book describes their arrival: preaching against girls’ education, shutting down DVD sellers and barber shops and displaying the bodies of people they’ve executed.

Malala considers herself a believing Muslim and a proud member of the Pashtun ethnic group, but recounts how from an early age she questioned her culture’s attitude toward women.

At 11, she began giving TV interviews in Pakistan about girls’ education. In 2009, she started writing a blog under a pseudonym.

She soon became well known within Pakistan, and therefore a potential Taliban target. But she was reassured by the thought: “Even the Taliban don’t kill children.”

That optimism proved misplaced, but, miraculously, it seemed to many, Malala survived the shooting.

The final part of the book describes Malala’s life from the moment she regained consciousness in a British hospital, where she had been flown for specialist treatment, with the thought: “Thank God I’m not dead.”

She undergoes intense pain and multiple surgeries.

Malala goes to school in England now, and lives with her family in a house behind a big gate in the city of Birmingham. It reminds her a bit of being under house arrest.

She remains determined to return to Pakistan one day and enter politics. And she says the Taliban’s attempt to silence her has backfired spectacularly.