What is the mistake in this code ? Why I am not geting the desired output?
import random def myattack() : ketondamage = ["Keton dodge your attack","30 % damage to keton","10 % damage to keton","Critical 70 % damage to keton"] m = random.choice(ketondamage) print(str(m)) if str(m) == ketondamage[0]: print("[//////////]") elif str(m) == ketondamage[1]: print("[///////]") elif str(m) == ketondamage[2]: print("[/////////]") elif str(m) == ketondamage[3]: print("[///]") else: print("error") myattack() Output :- Traceback (most recent call last): File "source_file.py", line 7, in <module> if str(m) == ketondamage[0]: NameError: name 'm' is not defined Process finished with exit code 1.Traceback (most recent call last): File "v.py", line 7, in <module> if str(m) == ketondamage[0]: NameError: name 'm' is not defined Process finished with exit code 1.