Write a program that takes multiple student marks as input. If a user enters negative
marks, the program writes all marks to a file called “marks.txt” and exits.
i = 0
while i:
marks = int('Enter marks of students here: ')
file1 = open('class_mark.txt', 'w')
file1.write(marks)
if marks < 0:
break
Comments
Leave a comment