synthesis

Wed W2

Announcements

  • Welcome to IDS-101-13: Thinking Machines!
  • Week 2!
    • My SSN is 123 45 6789 (this is true) ssn = '123456789'
    • Usually we break into "chunks" ssn = [ssn[:3], ssn[3:5], ssn[5:]]
    • What is the first (zeroth) digit of the second (oneth) chunk? print(ssn[1][0])
    • It was 4
    • I'll term this style of thinking "synthesis".

Scary

  • I think we can all agree this looks bad: [ssn[:3], ssn[3:5], ssn[5:]][1][0]
  • But it is understandable to a thinking machine
  • We may wish instead to say:
    • If I split my ssn into chunks...
    • of size 3, 2, and 4...
    • and inspect the second/oneth chunk...
    • and of that chunk inspect the first/zeroth piece...
    • That is the first letter of the second chunk of my ssn.
  • This style of speaking is uncommon verbally, but is quite common when trying to understand
    • What is the x of the y of the z
    • What is the free throw percentage of the point guard of the division champion team
    • What are the units of the energy E of E = mc2
Group 1Group 2Group 3Group 4

Question #1

What did you learn about the aims of university education in week one?
  • Think about a possible answer on your own
  • Discuss your answers with the rest of the group
  • Record a summary of each group’s discussion

Question #2

How do you differentiate styles of thinking used in high school class and college classes?
  • Think about a possible answer on your own
  • Discuss your answers with the rest of the group
  • Record a summary of each group’s discussion

Question #3

What is the most challenging thinking technique you have used in your life so far?
  • Think about a possible answer on your own
  • Discuss your answers with the rest of the group
  • Record a summary of each group’s discussion

Python for Data Science

  • One way we can model synthesis is by combining Python techniques with themselves or with each other.
  • Moving beyond our intro to Python, we begin chapter B: Data Science...
  • Exercise B.1 Write a function prints all the pairs of a list.
    • Consider the following: conts = ['Africa', 'Americas', 'Antarctica', 'Eurasia', 'Oceania']
    • How can we use list comprehension(s): [<something> for c in conts]
    • To create pairs.
      • Should we use a lambda expression, like the famous expression "cons": cons = lambda x, y : [x, y]
      • Should we use lambda expressions within lambdas, like this technique for list reversal: rev = lambda x : [e for e in x[::-1]]
      • It is okay if these look confusion - just explore them!

Question #4

What do you do when given a hard problem?
  • Think about a possible answer on your own
  • Discuss your answers with the rest of the group
  • Record a summary of each group’s discussion

Homework

  • Homework 3 Electoral Votes
    • Using multiple line strings, the new .split() method, and what you know about indices, write code that takes the information from Archives.gov and creates a list of states and their number of electoral votes.
    • This is a special list that will help us latter.
      • You may need many lines of code or many cells.
      • Whatever you submit you should test using "run all" or "ctrl+F9" to make sure that when I run your code, or when you run the code in the future, that it does what you expect.
    • You may make a copy of this Notebook and share it with me and anyone with whom you collaborate.
      • Give Shouvik and I edit permissions.
      • Due Fri @ 12 Noon (so we're able to discuss it in class)
      • You may only give your peers view or comment permissions.
    • It is more important to try things that interest you than to complete the assignment.