Module 2 · after
The same 6 questions you saw before the module. No running the code: predict, then compare with your first score.
t = ['.', 'z', 'o', 'e', '.'] pairs = list(zip(t, t[1:])) print(len(pairs), pairs[-1])
docs = ['bob', 'abby'] uchars = sorted(set(''.join(docs))) BOS = len(uchars) print(uchars, BOS)
row = [] m = [] for r in range(3): row.append(r) m.append(row) print(m[0])
class Score: def __init__(self, points): self.points = points def __add__(self, other): return Score(self.points + other.points) a = Score(3) b = Score(4) c = a + b + Score(10) print(c.points, a.points)
Your answers are saved with a random id, not your name, so we can see which lessons work. Privacy