Adverb to modify a verb
Incorrect: I have done bad in the exam.
Correct : I have done badly in the exam.
Note: We need an adverb to modify a verb. “Bad” is an adjective which cannot modify the verb before it. “Badly” is an adverb which properly modifies the verb. You can say:
He has done well in the exam.
Here “well” is an adverb.