diff --git a/disc/disc07/index.html b/disc/disc07/index.html index 007b64de6..20bcc8714 100644 --- a/disc/disc07/index.html +++ b/disc/disc07/index.html @@ -163,13 +163,11 @@

Now switch to Pensieve:

Once you're on Pensieve, you don't need to return to this page; Pensieve has all the same content (but more features). If for some reason Penseive doesn't work, return to this page and continue with the discussion.

-

Post in the #help channel on Discord if you have trouble.

-

Getting Started

@@ -179,68 +177,6 @@

Getting Started

Did you discover any common interests among your group members?

-

Q1: Draw

- - -

The draw function takes a list hand and a list of unique non-negative -integers positions that are all less than the length of hand. It removes -hand[p] for each p in positions and returns a list of those elements in -the order they appeared in hand (not the order they appeared in positions).

- -

Fill in each blank with one of these names: list, map, filter, reverse, -reversed, sort, sorted, append, insert, index, remove, pop, -zip, or sum. See the built-in functions and -list methods -documentation for descriptions of what these do.

- -

Discussion Time: Before writing anything, talk as a group about what -process you'll implement in order to make sure the right cards are removed and -returned. Try not to guess-and-check! The purpose of discussion is for you to -try to solve problems without the help of an interpreter checking your work.

- - -
- Run in 61A Code - -
- - - - - -
-For a list s and integer i, s.pop(i) returns and removes the ith -element, which changes the position (index) of all the later elements but -does not affect the position of prior elements. -
- - - -
-Calling reversed(s) on a list s returns an iterator. Calling -list(reversed(s)) returns a list of the elements in s in reversed order. -
- -

Aced it? Give yourselves a hand!

- -

Object-Oriented Programming

@@ -250,7 +186,7 @@

Object-Oriented Programming

try to implement the class's methods in terms of those attributes.

-

Q2: Keyboard

+

Q1: Keyboard

Overview: A keyboard has a button for every letter of the alphabet. When a @@ -317,14 +253,33 @@

Q2: Keyboard

- -
+
Since self.letter is always lowercase, use self.letter.upper() to produce the uppercase version.
+ +
+The number of times caps_lock has been pressed is either +self.caps_lock.pressed or Button.caps_lock.pressed. +
+ + + +
+The output attribute is a function that can be called: +self.output(self.letter) or self.output(self.letter.upper()). You do not +need to return the result. +
+ +
Run in 61A Code