Write a program to make result of students
P=open("result.txt","w")
print("Kendriya Vidyalaya NO.3,AF-2,Jamnagar")
n=int(input("Enter number of students:"))
for i in range(n):
P.write("______________________________________________________________________________________________________")
P.write(" \n")
name=input("\n Enter a name of the students:")
Roll=input("Enter roll no of the students:")
ph=int(input("Enter marks of physics:"))
C=int(input("Enter marks of chemisrty:"))
M=int(input("Enter marks of math:"))
Marks=ph+C+M
Percent=((Marks)*100)/300
S="Name:"+name+" "+ "Roll no."+ Roll +" "
P.write("Kendriya Vidyalaya NO.3 , AF-2, Jamnagar ")
P.write("\n " )
P.write("\n")
P.write("\n")
P.write(S )
P.write("\n")
P.write("--------------------------------------------------------------------------------------------------")
P.write("\n")
P.write("\n ")
P.write("Subjects Marks of subject ")
P.write("\n")
P.write("-----------------------------------------------------------------------------------------------")
P.write("\n ")
P.write("\n ")
P.write("Physics " )
P.write( str(ph) )
P.write("\n ")
P.write("-----------------------------------------------------------------------------------------------")
P.write("\n")
P.write("Chemistry " )
P.write( str(C) )
P.write("\n")
P.write("-----------------------------------------------------------------------------------------------")
P.write("\n ")
P.write("Maths ")
P.write( str(M) )
P.write("\n")
P.write("-----------------------------------------------------------------------------------------------")
P.write(" ")
P.write("\n Result:")
P.write("\n ")
if Percent>33:
P.write("pass")
else:
P.write("not pass")
P.write("\n")
P.write(" Percentage:")
P.write( str(Percent) )
if Percent>33:
P.write(" pass")
else:
P.write(" not pass")
P.write("\n")
P.write("---------------------------------------------------------------------------------------------------")
P.close()
No comments: