Git Product home page Git Product logo

cs61a's Introduction

CS61A

Homework1

  1. Can assign a function directly
  2. no self-increment, use val+=1
  3. max or min function in Python can be given a lot of parameters

Homework2

  1. Nested Definitions
  2. Functions as Returned Values

Homework3

  1. use helper function in the function as a nested and the out funtion return an instance of it
  2. lambda expression's level: eg : (lambda f: lambda k: f(f, k))(lambda f, k: k if k == 1 else mul(k, f(f, sub(k, 1)))) here, we create a lambda expression which has 2 order (lambda f: lambda k: f(f, k)) and the follow (lambda f, k: k if k == 1 else mul(k, f(f, sub(k, 1)))) as the first parameter.

Cats

  1. res = [[] for _ in player_indices], to create 2 dimension list
  2. try to use abstraction as much as possible
  3. READ the text CAREFULLY

Homework4 very interest recursion and math problem!

Lab06 yield from recursion and yield

Ants Some useful OOP diagram

Homework5 OOP and generator( easy when we write recursive function first)

Lab07 HELP function defined in a function may be helpful to deliver arguments

Lab08

  1. The mutation of a data structure and assignment is different
  2. Recusive funtion is still need to improve

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.