Lecture 11/17/2026
This commit is contained in:
parent
07b9e54bf0
commit
bf3265103a
44 changed files with 1195 additions and 3 deletions
14
lecture20261117/while/while04.py
Normal file
14
lecture20261117/while/while04.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
print("Process list")
|
||||
|
||||
names = [ "Harry", "Larry", "Moe", "Katrina", "Colorado", "Shenanigans", "Tracey"]
|
||||
counter = len(names) ;
|
||||
index = 0
|
||||
|
||||
print("\nThe length of the list is {}\n".format(counter))
|
||||
|
||||
while(counter > 0 ):
|
||||
print("Counter = ",counter, " Index = ", index)
|
||||
print("names[{}] = {}\n".format(index,names[index]))
|
||||
index = index + 1
|
||||
counter = counter - 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue