Giter VIP home page Giter VIP logo

mit-6.0001-intro-to-computer-science-and-programming-in-python's Introduction

Computer Science and Programming in Python

1. Topics

  • Represent knowledge with data structure
  • Iteration and recursion as computational metaphors
  • Abstraction of procedures and data types
  • Organize and modulative systems using object classes and methods
  • Different classes of algorithms, searching and sorting
  • Complexity of algorithms

2. Objects

Programs manipulate data objects

  • Objects are

    • Scalar (connot be subdivided)

    • Non-scalar (have internal structure that can be accessed)

  • Scalar objects

    • int
    • float
    • bool
    • NoneType - special and has one value, None
    • can use type() to see the type of an object

3. Contents

  • Branching and Iteration

    • strings
    • branching - if/elif/else
    • while loops
    • for loops
  • Sring manipulation guess-and-check approximations bisection

    • string manipulation
    • guess and check algorithms (exhaustive enumeration)
    • approximate solutions (start with a guess and increment by some small value)
    • bisection method (half interval each iteration, new guess is halfway in between)
  • Structuring programs and hiding details

    • projectors and decomposition
    • abstraction
    • functions and scope
  • Tuplea, lists, aliasing, mutability, cloning

    • compound data types: tuples and lists
      • tuples: immutable, swap variables values, return more than one value from a function
      • lists-mutable
    • idea of aliasing
    • idea of mutability
    • idea of cloning
  • Recursion , dictionary

    • recursion-divide/decrease and conquer

      recursion is the process of repeating items in a self-similar way

      • reduce a problem to simpler versions of the same problem
      • must have one or more base cases that are easy to solve
      • must solve the same problem on some other input with the goal of simplifying the larger problem input
      • examples: multiplication iterative, factorial
        • each recursive call to a function creates its own scope/environment
        • bindings of variables in a scope are not changed by recursive call
        • flow of control passes back to previous scope once function call returns value
    • dictionaties-another mutable object type

      • values
        • any type
        • can be duplicates
        • dictionary values can be lists, even other dictionaries
      • keys
        • must be unique
        • immutable type
      • no order to keys or values

mit-6.0001-intro-to-computer-science-and-programming-in-python's People

Contributors

ninapannn avatar

Watchers

 avatar

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.