Python Program to Create Dictionary to print student result in Grade
name=input("Enter your name:")
result={'c':70,'python':75,'PHP':80,'DBMS':70,'web':85}
sum=0
for i in result.values():
sum=sum+i
P=(sum/500)*100
print(f"Following is {name}'s performance in Examination")
print(f" {name}'s obtained marks in Examination is:",sum,end=" ")
print(f"\nThe percentage of {name} in Examination is:",P,end=" ")
if P>=90:
print(f"{name} has OUTSTANDING performance in Examination")
elif P>=80 and P<90:
print(f"\n{name} has EXCELENT performance in Examination")
elif P>=70 and P<80:
print(f"\n{name} has DISTINCTION in Examination")
elif P>=60 and P<70:
print(f"\n{name} has FIRST CLASS in Examination")
elif P>=50 and P<60:
print(f"\n{name} has SECOND CLASS in Examination")
elif P>=40 and P<50:
print(f"\n{name} is just Pass in Examination")
else:
print(f"\n{name} is FAIL in Examination")
Output:
Enter your name:Atharv
Following is Atharv's performance in Examination
Atharv's obtained marks in Examination is: 380
The percentage of Atharv in Examination is: 76.0
Atharv has DISTINCTION in Examination
0 टिप्पण्या
कृपया तुमच्या प्रियजनांना लेख शेअर करा आणि तुमचा अभिप्राय जरूर नोंदवा. 🙏 🙏