lndex_no_l ,mark_ll ,mark_l2,mark_l3
Index_no_2 ,mark_2l ,mark_22 ,mark_23
Answer
file = open("marks.txt", "a") running=1 while (running ==1) : indexNo = raw_input("Enter Index No: ") if (indexNo=="-1"): running=-1 else : mark1 = raw_input("Enter marks 1: ") mark2 = raw_input("Enter marks 2: ") mark3 = raw_input("Enter marks 3: ") str=indexNo + "," + mark1 + "," + mark2 + "," + mark2 + "\n" file.write (str) file.close()