Lecture 11/17/2026

This commit is contained in:
Edward Bigos 2026-11-17 12:30:27 -05:00
commit bf3265103a
44 changed files with 1195 additions and 3 deletions

View file

@ -0,0 +1,29 @@
print("Process fNames")
fNames = [ "Harry Bigos", "Moe Howard", "Katrina Smith", "Colorado Jones", "Shenanigans Davis", "Tracey Carter"]
counter = 0
print("\nThe length of the list is {}\n".format(len(fNames)))
while(counter < len(fNames) ):
print("Counter = ",counter)
print("fNames[{}] = {}".format(counter,fNames[counter]))
counter = counter + 1
print("Process list - sorted - but doesn't work right")
fNames.sort()
counter = 0 ;
print("\nThe length of the list is {}\n".format(len(fNames)))
while(counter < len(fNames) ):
print("Counter = ",counter)
print("fNames[{}] = {}".format(counter,fNames[counter]))
counter = counter + 1
print("Problem: How do we sort both lists and keep the first and last names together.")
print("One solution: Redefine the data.")