2026fa_cse160/lecture20261117/for01/for07.py
2026-11-17 12:30:27 -05:00

14 lines
350 B
Python

#https://www.programiz.com/python-programming/for-loop
# program to display student's marks from record
student_name = 'Soyuj'
student_name = 'James'
marks = {'James': 90, 'Jules': 55, 'Arthur': 77}
for student in marks:
if student == student_name:
print(marks[student])
break
else:
print('No entry with that name found.')