No doubt: Barack Obama has what it takes to be a terrific law student. It’s less clear those are the ingredients of a successful president.

A great law student excels at reading the fact pattern on an exam and spotting the legal issues. The student then analyzes the situation and presents the pros and cons of each side in a dispassionate, balanced way.

It is less important, for grading purposes, to come down on one side or another than to demonstrate a mastery of the precedents and complexities.

By that rubric, Obama’s speech last week at the National Defense University deserves a solid A. I do not say this dismissively. The analytical skills of the lawyer are valuable attributes in a president.

And this one clearly has wrestled with the difficult choices and trade-offs confronting him — on drone strikes, Guantanamo detainees, leak investigations and the overall legal architecture of the war on terror.

This thoughtfulness offers a stark contrast with his predecessor. If George W. Bush was the Decider, Barack Obama is the Agonizer — and this is a good thing. Bush decided too precipitously and agonized too little. On matters so complex and momentous, analyzing and agonizing are prerequisites to action.

Thus, Obama on drone strikes: On the one hand, the risk of civilian casualties from drones must be weighed against the cost of inaction. The risk of using drones must be weighed against the risk of conventional military means, simultaneously less precise and more dangerous.

On the other, “the very precision of drone strikes and the necessary secrecy often involved in such actions can end up shielding our government from the public scrutiny that a troop deployment invites. It can also lead a president and his team to view drone strikes as a cure-all for terrorism.”

All true, and so Obama, ever the A-plus student, posits the need for additional oversight and poses options, each of which “has virtues in theory, but poses difficulties in practice.”

A special court “has the benefit of bringing a third branch of government into the process, but raises serious constitutional issues about presidential and judicial authority.” Likewise, an internal oversight board “avoids those problems, but may introduce a layer of bureaucracy into national security decision-making, without inspiring additional public confidence in the process.”

Brilliant, if you were scribbling exam answers in a blue book. Less impressive five years into a presidency. It seems a little late in the day for the president to talk about looking forward “to actively engaging Congress to explore these and other options for increased oversight.”

The law student gets points for identifying the issue. The president only succeeds by proposing — and implementing — a solution.

Same with Guantanamo. The president is certainly correct that congressional restrictions on transferring detainees to prisons in the United States “make no sense” and that the continuing operation of the detention facility costs the United States too much in reputation and treasure.

But, again, five years into being commander in chief, Obama gets little credit for announcing that he is appointing “a new senior envoy” to oversee the transfer of detainees — not when he allowed the previous position to lapse. He gets little credit for lifting a moratorium on detainee transfers to Yemen that he himself put in place.

And he gets particularly little credit for simply identifying the most intractable and festering issue: How to handle detainees known to be dangerous but who cannot be prosecuted because the evidence against them was obtained by torture.

The president asserted that what he blithely dismissed as “this legacy problem” could be “resolved, consistent with our commitment to the rule of law.”

This answer doesn’t even pass the law student test. How, exactly? That the solution is elusive does not justify this blatant dodge.

Then there is the matter of the Justice Department’s leak investigations. The president awarded himself credit for asking Congress to pass a shield law “to guard against government overreach.”

This is rather rich when it is Obama’s own government that has been overreaching. The president can’t — and shouldn’t — micromanage criminal investigations, but he is responsible for setting policy.

In the speech, as always, Obama came off as sober and measured. Those qualities are necessary but not sufficient for a successful presidency. That requires a chief executive skilled not only in spotting issues but also in crafting solutions and driving them to a successful conclusion — yes, even in the face of an uncooperative, even irrational opposition.

Ruth Marcus is a columnist and editorial writer for The Washington Post.