├── art ├── mit-cs.png └── 6-01scs11.png ├── 01_6.01 ├── 01 │ ├── Wk.1.3.2.txt │ ├── Wk.1.3.3.py │ ├── Wk.1.3.1.py │ ├── README.md │ ├── Wk.1.3.3.txt │ ├── Wk.1.3.4.py │ └── Wk.1.3.2.py └── README.md ├── .gitignore ├── LICENSE └── README.md /art/mit-cs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duliodenis/mit-cs-courses/HEAD/art/mit-cs.png -------------------------------------------------------------------------------- /art/6-01scs11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duliodenis/mit-cs-courses/HEAD/art/6-01scs11.png -------------------------------------------------------------------------------- /01_6.01/01/Wk.1.3.2.txt: -------------------------------------------------------------------------------- 1 | # 2 | # MIT 6.01 (Week 1) 3 | # Design Lab 1. Problem 1.3.2 4 | # 5 | # Created by Dulio Denis on 1/4/15. 6 | # Copyright (c) 2015 ddApps. All rights reserved. 7 | # ------------------------------------------------ 8 | # http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-01sc-introduction-to-electrical-engineering-and-computer-science-i-spring-2011/unit-1-software-engineering/object-oriented-programming/MIT6_01SCS11_1_3_2.pdf 9 | # 10 | Fill in what gets printed by the interpreter after the following expressions. 11 | 12 | 1. 'A cool grey car' 13 | 14 | 2. 'A cool grey car' 15 | 16 | 3. 'gray' 17 | 18 | 4. 'A cool grey car' 19 | 20 | 5. 'A cool plaid car' 21 | 22 | 6. 'plaid' 23 | 24 | 7. 'A cool grey car' 25 | 26 | 8. Error - lola has no size attribute 27 | 28 | 9. 'big' 29 | 30 | 10. 'small' -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | lib/ 17 | lib64/ 18 | parts/ 19 | sdist/ 20 | var/ 21 | *.egg-info/ 22 | .installed.cfg 23 | *.egg 24 | 25 | # PyInstaller 26 | # Usually these files are written by a python script from a template 27 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 28 | *.manifest 29 | *.spec 30 | 31 | # Installer logs 32 | pip-log.txt 33 | pip-delete-this-directory.txt 34 | 35 | # Unit test / coverage reports 36 | htmlcov/ 37 | .tox/ 38 | .coverage 39 | .cache 40 | nosetests.xml 41 | coverage.xml 42 | 43 | # Translations 44 | *.mo 45 | *.pot 46 | 47 | # Django stuff: 48 | *.log 49 | 50 | # Sphinx documentation 51 | docs/_build/ 52 | 53 | # PyBuilder 54 | target/ 55 | -------------------------------------------------------------------------------- /01_6.01/01/Wk.1.3.3.py: -------------------------------------------------------------------------------- 1 | # 2 | # MIT 6.01 (Week 1) 3 | # Design Lab 1. Problem 1.3.3 4 | # 5 | # Created by Dulio Denis on 1/5/15. 6 | # Copyright (c) 2015 ddApps. All rights reserved. 7 | # ------------------------------------------------ 8 | # http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-01sc-introduction-to-electrical-engineering-and-computer-science-i-spring-2011/unit-1-software-engineering/object-oriented-programming/MIT6_01SCS11_1_3_3.pdf 9 | # 10 | class Car: 11 | weight = 1000 12 | 13 | def __init__(self, weight, driver): 14 | self.weight = weight 15 | self.driver = driver 16 | 17 | class Person: 18 | weight = 100 19 | 20 | def __init__(self, weight): 21 | self.weight = weight 22 | 23 | # 1. 24 | # Person 25 | # <__main__.Person instance at 0x0000000001C53748> 26 | 27 | # 2. 28 | p = Person(150) 29 | print "p is %r" % p 30 | 31 | #3. 32 | c = Car(2000, p) 33 | print "Car.weight is %r" % Car.weight 34 | 35 | #4 36 | print "c.weight is %r" % c.weight 37 | 38 | #5 39 | print "c.driver.weight is %r" % c.driver.weight -------------------------------------------------------------------------------- /01_6.01/01/Wk.1.3.1.py: -------------------------------------------------------------------------------- 1 | # 2 | # MIT 6.01 (Week 1) 3 | # Design Lab 1. Problem 1.3.1 4 | # 5 | # Created by Dulio Denis on 1/4/15. 6 | # Copyright (c) 2015 ddApps. All rights reserved. 7 | # ------------------------------------------------ 8 | # http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-01sc-introduction-to-electrical-engineering-and-computer-science-i-spring-2011/unit-1-software-engineering/object-oriented-programming/MIT6_01SCS11_designLab01.pdf 9 | # 10 | # Objective: Write the definition of a Python procedure fib, such that fib(n) returns 11 | # the nth Fibonacci number. 12 | def fib(n): 13 | if n == 0: 14 | return 0 15 | if n == 1: 16 | return 1 17 | else: 18 | return fib(n-1) + fib(n-2) 19 | 20 | 21 | # Test the Fibonacci procedure 22 | firstTest = 6 # fib(6) -> 8 23 | secondTest = 7 # fib(7) -> 13 24 | thirdTest = 8 # fib(8) -> 21 25 | firstResult = fib(firstTest) 26 | secondResult = fib(secondTest) 27 | thirdResult = fib(thirdTest) 28 | 29 | print "fib1(%r) = %r" % (firstTest, firstResult) 30 | print "fib2(%r) = %r" % (secondTest, secondResult) 31 | print "fib3(%r) = %r" % (thirdTest, thirdResult) -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Dulio Denis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /01_6.01/README.md: -------------------------------------------------------------------------------- 1 | 6.01: Introduction to EE and CS I 2 | ============== 3 | 4 | ![](https://raw.githubusercontent.com/duliodenis/mit-cs-courses/master/art/6-01scs11.png) 5 | 6 | This course provides an integrated introduction to electrical engineering and computer science, taught using substantial laboratory experiments with mobile robots. The primary goal is to learn to appreciate and use the fundamental design principles of modularity and abstraction in a variety of contexts from electrical engineering and computer science. 7 | 8 | The second goal is to demonstrate that making mathematical models of real systems can help in the design and analysis of those systems. Finally, there is the more typical goals of teaching exciting and important basic material from electrical engineering and computer science, including modern software engineering, linear systems analysis, electronic circuits, and decision-making. 9 | 10 | Below are the problem sets for this course. 11 | 12 | | No | Course | Problems | 13 | | ------------- |:-------------:| :-----:| 14 | | 1. | Design Lab 1 | 6 | 15 | 16 | ### Support or Contact 17 | Visit [ddApps.co](http://ddapps.co) to see more. 18 | -------------------------------------------------------------------------------- /01_6.01/01/README.md: -------------------------------------------------------------------------------- 1 | ## 6.01 Week 1 Design Lab 2 | 3 | These are the problems in the Week 1 Design Lab problem set. 4 | 5 | | File | Problem # | Question | 6 | | ------------- |:-------------:| -----| 7 | | **Wk.1.3.1.py** | 1.3.1 | This is the Fibonacci number generator | 8 | | **Wk.1.3.2.txt** | 1.3.2 | Object-Oriented Practice exercises answers | 9 | | **Wk.1.3.2.py** | 1.3.2 | Object-Oriented Practice exercises programmatic results | 10 | | **Wk.1.3.3.txt** | 1.3.3 | More Object-Oriented Practice exercises | 11 | | **Wk.1.3.4.py** | 1.3.4 | The V2 class as specified in the software lab handout | 12 | | **Wk.1.3.5.txt** | 1.3.5 | Polynomial Representations exercises | 13 | | **Wk.1.3.6.py** | 1.3.6 | The Polynomial class that is described in the lab handout | 14 | | TBD | 1.4.1 | Structured Assisgnments | 15 | | TBD | 1.4.2 | Nested and Shared Structures | 16 | | TBD | 1.4.3 | List comprehension | 17 | | TBD | 1.4.4 | OOP | 18 | | TBD | 1.4.5 | More OOP | 19 | | TBD | 1.4.6 | Even more OOP | 20 | | TBD | 1.4.7 | Palindrome | 21 | 22 | ### Support or Contact 23 | Visit [ddApps.co](http://ddapps.co) to see more. 24 | -------------------------------------------------------------------------------- /01_6.01/01/Wk.1.3.3.txt: -------------------------------------------------------------------------------- 1 | # 2 | # MIT 6.01 (Week 1) 3 | # Design Lab 1. Problem 1.3.3 4 | # 5 | # Created by Dulio Denis on 1/5/15. 6 | # Copyright (c) 2015 ddApps. All rights reserved. 7 | # ------------------------------------------------ 8 | # http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-01sc-introduction-to-electrical-engineering-and-computer-science-i-spring-2011/unit-1-software-engineering/object-oriented-programming/MIT6_01SCS11_1_3_3.pdf 9 | # 10 | Provide the value of the expressions being evaluated and the type of the resulting value. 11 | - If evaluating an expression would cause an error, select noneType and write error in the box. 12 | - If the value is None, select noneType and enter None. 13 | - If the value of an expression is a procedure or class, select the appropriate type and also 14 | write the name of the procedure or class in the box, as appropriate. 15 | - If the value is an instance, write the Class name in the box. 16 | - Select the appropriate type for integers, floats and lists and enter the value. 17 | 18 | 1. Person is a class 19 | 20 | 2. p is noneType instance 21 | 22 | 3. Car.weight yields int of 1000 23 | 24 | 4. c.weight yields int of 2000 25 | 26 | 5. c.driver.weight yields int of 150 27 | -------------------------------------------------------------------------------- /01_6.01/01/Wk.1.3.4.py: -------------------------------------------------------------------------------- 1 | # 2 | # MIT 6.01 (Week 1) 3 | # Design Lab 1. Problem 1.3.4: 2D vector arithmetic 4 | # 5 | # Created by Dulio Denis on 1/5/15. 6 | # Copyright (c) 2015 ddApps. All rights reserved. 7 | # ------------------------------------------------ 8 | # http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-01sc-introduction-to-electrical-engineering-and-computer-science-i-spring-2011/unit-1-software-engineering/object-oriented-programming/MIT6_01SCS11_1_3_3.pdfhttp://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-01sc-introduction-to-electrical-engineering-and-computer-science-i-spring-2011/unit-1-software-engineering/object-oriented-programming/MIT6_01SCS11_1_3_4.pdf 9 | # 10 | # Define a Python class V2 , which represents two-dimensional vectors and 11 | # supports the following operations: 12 | # - Create a new vector out of two real numbers: v = V2(1.1, 2.2) 13 | # - Convert a vector to a string (with the __str__ method) 14 | # - Access the components (with the getX and getY methods) 15 | # - Add two V2 s to get a new V2 (with add and __add__ methods) 16 | # - Multiply a V2 by a scalar (real or int) and return a new V2 17 | # (with the mul and __mul__ methods) 18 | # 19 | -------------------------------------------------------------------------------- /01_6.01/01/Wk.1.3.2.py: -------------------------------------------------------------------------------- 1 | # 2 | # MIT 6.01 (Week 1) 3 | # Design Lab 1. Problem 1.3.2 4 | # 5 | # Created by Dulio Denis on 1/4/15. 6 | # Copyright (c) 2015 ddApps. All rights reserved. 7 | # ------------------------------------------------ 8 | # http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-01sc-introduction-to-electrical-engineering-and-computer-science-i-spring-2011/unit-1-software-engineering/object-oriented-programming/MIT6_01SCS11_1_3_2.pdf 9 | # 10 | class Car: 11 | color = 'gray' 12 | def describeCar(self): 13 | return 'A cool ' + Car.color + ' car' 14 | def describeSelf(self): 15 | return 'A cool ' + self.color + ' car' 16 | 17 | nona = Car() 18 | print "1. nona.describeCar() yields: %s" % nona.describeCar() 19 | print "2. nona.describeSelf() yields: %s" % nona.describeSelf() 20 | print "3. nona.color yields: %s" % nona.color 21 | 22 | lola = Car() 23 | lola.color = 'plaid' 24 | 25 | 26 | print "4. lola.describeCar() yields: %s" % lola.describeCar() 27 | print "5. lola.describeSelf() yields: %s" % lola.describeSelf() 28 | print "6. lola.color yields: %s" % lola.color 29 | print "7. nona.describeSelf() yields: %s" % nona.describeSelf() 30 | 31 | nona.size = 'small' 32 | 33 | # print "8. lola.size yields: %s" % lola.size 34 | print "8. lola.size yields: %s" % "AttributeError: Car instance has no attribute 'size'" 35 | 36 | Car.size = 'big' 37 | 38 | print "9. lola.size yields: %s" % lola.size 39 | print "10. nona.size yields: %s" % nona.size -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | MIT Computer Science Courses 2 | ============== 3 | 4 | ![](https://raw.githubusercontent.com/duliodenis/mit-cs-courses/master/art/mit-cs.png) 5 | 6 | This repository is for tracking and publishing my problem sets in the junior and senior year courses of the MIT Computer Science program from the [MIT Open Courseware](http://ocw.mit.edu/index.htm). 7 | 8 | No | Course 9 | ------------- | ------------- 10 | 1. | [6.01: Introduction to EE and CS I](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-01sc-introduction-to-electrical-engineering-and-computer-science-i-spring-2011/) 11 | 2. | [6.02: Introduction to EE and CS II](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-02-introduction-to-eecs-ii-digital-communication-systems-fall-2012/) 12 | 3. | [6.042J: Mathematics for Computer Science](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/index.htm) 13 | 4. | [6.006: Introduction to Algorithms](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/) 14 | 5. | [18.01: Single Variable Calculus](http://ocw.mit.edu/courses/mathematics/18-01-single-variable-calculus-fall-2006/) 15 | 6. | [18.06: Linear Algebra](http://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/) 16 | 7. | [6.041: Probabilistic Systems Analysis](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-041-probabilistic-systems-analysis-and-applied-probability-fall-2010/) 17 | 8. | [6.046J: Design and Analysis of Algorithms](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/) 18 | 9. | [6.034: Artificial Intelligence](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-034-artificial-intelligence-fall-2010/) 19 | 10. | [6.004: Computation Structures](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-004-computation-structures-spring-2009/) 20 | 11. | [6.033: Computer Systems Engineering](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-033-computer-system-engineering-spring-2009/) 21 | 12. | [6.005: Elements of Software Construction](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-005-elements-of-software-construction-fall-2011/) 22 | 13. | [6.801: Machine Vision](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-801-machine-vision-fall-2004/) 23 | 14. | [6.837: Computer Graphics](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-837-computer-graphics-fall-2012/) 24 | 15. | [6.045J: Automata, Computability, and Complexity](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-045j-automata-computability-and-complexity-spring-2011/) 25 | 26 | If the above fifteen courses seems either overwhelming or too MIT oriented then perhaps you'd like to start with just the core courses. I've selected the following eight courses from across Stanford, Harvard and Georgia Tech which I consider the best in class in curriculum, interactivity and community at EdX, Coursera and Udacity: 27 | 28 | No | Platform | University Course 29 | ------------- | ------------- | ------------- 30 | 1. | EdX | [Harvard CS50: Intro to CS](https://github.com/duliodenis/harvard-cs50-psets) 31 | 2. | Udacity | [Udacity CS212: Design of Computer Programs](https://www.udacity.com/course/design-of-computer-programs--cs212) 32 | 3. | Coursera | [Stanford CS161: Algorithms: Part 1 & 2](https://www.coursera.org/course/algo) 33 | 4. | Udacity | [Stanford CS188: AI: YouTube Playlist](https://www.youtube.com/watch?v=W1S-HSakPTM&list=PLNozK-HB4MXsVAN6cqkCAO09RChbIAk5i) 34 | 5. | Udacity | [Udacity CS313: Intro to Theoretical Computer Science](https://www.udacity.com/course/intro-to-theoretical-computer-science--cs313) 35 | 6. | Udacity | [Georgia Tech CS6505: Computability & Complexity](https://www.udacity.com/course/computability-complexity-algorithms--ud061) 36 | 7. | Udacity | [Georgia Tech CS6210: Advanced Operating Systems](https://www.udacity.com/course/advanced-operating-systems--ud189) 37 | 8. | Coursera | [Stanford CS143: Compilers](https://www.coursera.org/course/compilers) 38 | 39 | ### Support or Contact 40 | Visit [ddApps.co](http://ddapps.co) to see more. 41 | --------------------------------------------------------------------------------