Test advice. Understanding code by modifying it and getting better at algorithms by adapting them.
How to study and prepare:
Review of session #12 (Thursday, October 1st).
( and review of many other related sessions on binary, hexadecimal, Strings,
if, for and while techniques ).
Suggestions for exam preparation (These two things can make the DIFFERENCE).
>>> name = "Mark Jacobson" >>> name2 = ????? >>> name2 Jacobson, Mark
>>> helpR = " 1 2 3 4 " >>> seeEm = "0123456789012345678901234567890123456789012345" >>> names = "Richie Havens: Here comes the sun. Woodstock." >>> names 'Richie Havens: Here comes the sun. Woodstock.' >>> len(names) 46 >>> names.count("o") 4 >>> names.find("o") 21 >>> names.find("o", names.find("o")+1) 37 >>> names.find("o", names.find("o", names.find("o")+1) + 1) 38 >>> names.find("o", names.find("o", names.find("o", names.find("o")+1) + 1) + 1) 42 >>> >>> names 'Richie Havens: Here comes the sun. Woodstock.' >>> print("\n" + helpR + "\n" + seeEm + "\n" + names) 1 2 3 4 0123456789012345678901234567890123456789012345 Richie Havens: Here comes the sun. Woodstock.
You have seen many examples of code to trace, debug, and write in class. They are scattered throughout the lecture notes, along with a few exercises done or suggested to from the textbook.
You don't need to memorize all the esoteric details of Python. In class, we have used a relatively small subset of what the textbook presents. Many of those are nice power tools for us to use once we understand how to write code. On the exam, I will generally ask you to use something specific.