Professional Documents
Culture Documents
Write a program to create a student dictionary containing the name (key) and marks (value) of 5
student taken whose marks is greater than 80. If not display appropriate message.
sd={}
for i in range(5):
mrks=int(input("Enter marks:"))
sd[stu_name]=mrks
for i in sd:
if sd[i]>80:
else:
print("There are no such student whose marks are greater than 80")
Output-
Enter the name of the student:Abhijit
Enter marks:70
Enter marks:85
Enter marks:76
Enter marks:90
Enter marks:85
The dictionary is {'Abhijit': 70, 'Ram': 85, 'Ankit': 76, 'Aditya': 90, 'Arjun': 85}