This is a benefit for the students when writing their exam.
Shaikh Ibn ul-Uthaymeen rahimahullah said:
“It is upon [the student] that his greatest reliance be upon Allah, the Exalted until He aids him. It is good when the question paper is extended to him or when he transcribes [the answers] upon it to mention Allah with a statement of assistance. It is: لا حول ولا قوة إلا بالله ‘There is no power or strength except with Allah.’ For verily the Prophet sallahu alayhi wa salam said about his statement:
يا عبد الله بن قيس ! ألا أدلك على كنز من كنوز الجنة؟ قال: بلى يا رسول الله! قال: لا حول ولا قوة إلا بالله
Abdullah b. Qais, said: Should I not direct you to a treasure from among the treasures of Paradise? I (‘Abdullah b. Qais) said: Allah’s Messenger, do it, of course. Thereupon he (the Prophet) said: Then recite: “There is no might and no power but that of Allah.
[Saheeh Muslim no. 2704]
In this word is the delegation of the affair to Allah and seeking assistance with Allah, the Exalted. Like this, it is necessary in every difficult affair to say this statement because it assists…”
[Taken from: Liqaa ash-Shahri no. 24]
He was also asked:
The statement in the book the Fortress of the Muslim: that the Prophet sallahu alahyhi wa salam used to supplicate when meeting the enemy saying:
اللهم أنت عضدي وأنت نصيري بك أحول وبك أصول وبك أقاتل
O Allah, You are my Supporter and my Helper. With Your help I get strength, and with Your help I bounce upon the enemy and defeat it, and with Your help I fight
[Abu Dawud 3/42, At-Tirmithi 5/572]
So can I use this supplication and what resembles it during a test? Is there any sin on me for this?
What is better is for you to say:
اللهم لا حول ولا قوة إلا بك اللهم أعني على هذا
“Oh Allah, there is no might nor strength except with you. Oh Allah aid me in this”
And what resembles that because this is not encountering the enemy. This is an exam or test and not encountering the enemy”.
[Noor ‘ala Darb no. 720]
Faisal Ibn Abdul Qaadir Ibn Hassan