Lecture 11/17/2026
This commit is contained in:
parent
07b9e54bf0
commit
bf3265103a
44 changed files with 1195 additions and 3 deletions
14
lecture20261117/for01/for07.py
Normal file
14
lecture20261117/for01/for07.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
#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.')
|
||||
Loading…
Add table
Add a link
Reference in a new issue