15-112 Agenda 25-May
- Quiz Review session moved to Sunday
- Monday will have normal office hours
- Upcoming
- hw4 asap (right after lecture), not as hard as hw3, probs one hw3 like problem a week
- anonymous feedback form
- TA Office Hours: getting unstuck vs finishing the hw with the TA
- Reminder: Office Hours today 1pm-5pm
- Previous mini quiz clarification
- Debugging helpful tool:
repr
- Quiz
- Quiz Tuesday in recitation, review during lecture Tuesday
- Quiz covers Syllabus,day1, day2, day3, and day4 (lightly)
- What does a quiz look like?
- Where to find quiz practice
- Asking questions during quizzes
- For roc + ct only result counts
- Do FR problems first
- Code Block of the Day
import swapi
luke = swapi.get_person(1)
print(luke.gender)
print(luke.name)
print(luke.eye_color)
print(luke.hair_color)
- Lists
- Why? Think back to most frequent letter, need to be able to store more things with respect to changing input size
- Goals for today:
- What is a list? Looping, accessing elements, printing, adding
- Mutability
# Try me with an integer, string, list
# Try me with a = a + 1
a = [1,2,3]
b = a
a += [4]
print(a)
print(b)
# try me with list, string, integer
# try me with a = a + 1
def g(a):
a += 1
print(a)
def f(a):
print(a)
g(a)
print(a)