Week 6: Lists; More Functions
Week 6 Goals
-
Learn to represent data using lists
-
Learn about list indexing other list operations
-
Learn how lists are used by functions
-
Learn another string operation
-
Learn print formatting
-
Learn another random library function
Week 6 Code
-
stringformatting.py: the print function with string formatting -
oops_squareFunc.py: function arguments -
listsOps.py: practice with lists and list operations -
squareLists-return.py: functions that take and return lists -
squareLists-inplace.py: functions that modify the elements of their list parameters -
rps.py: write a program that uses lists and random librarychoicefunction -
slicing.py: creating a substring (we likely won’t cover this this week)