MIT Python Programming #7

Lesson 7: Lists and mutability, dictionaries, pseudocode, introduction to efficiency

Massachusetts Institute of Technology (Open Course Ware): Introduction to Computer Science and Programming

View the complete course at: http://ocw.mit.edu/6-00F08

Introduction to Computer Science & Programming Class Notes

Lists and mutability, dictionaries, pseudo code, introduction
to efficiency

Lesson 6 we discussed lists. Lists are mutable.

Ivys [ 1 ] = -15    The object 1 within the
Ivys list is now given a value of -15

Ivys = [ 'Yale', '-1', 'Princeton' ...

Read more →
0

MIT Python Programming #4

Decomposition and abstraction through functions; introduction to recursion

Massachusetts Institute of Technology: Introduction to Computer Science and Programming

Lecture 4: Decomposition and abstraction through functions; introduction to recursion

Instructors: Prof. Eric Grimson, Prof. John Guttag

View the complete course at: http://ocw.mit.edu/6-00F08

Introduction to Computer Science & Programming Class Notes

In the previous 3 lessons we learned the following in our language:
– Assignment
– Conditionals
– Input/Output
– Looping Constructs (For, While)

Touring Complete: The above fundamentals are enough to ...

Read more →
0

MIT Python Programming #5

Lesson 5: Floating point numbers, successive refinement, finding roots

Massachusetts Institute of Technology (OpenCoarseWare): Introduction to Computer Science and Programming

Lecture 5: Floating point numbers, successive refinement, finding roots

Instructors: Prof. Eric Grimson, Prof. John Guttag

View the complete course at: http://ocw.mit.edu/6-00F08

Introduction to Computer Science & Programming Class Notes

Floating point numbers, successive refinement, finding roots

Python has 2 types of numbers:
int (integers – whole numbers)
Arbitrary precision (Long Integer)

The following code displays arbitrary precision:
a = 2**1000
Type ...

Read more →
0

MIT Python Programming #3

Lesson 3: Common code patterns: iterative programs

Massachusetts Institute of Technology: Introduction to Computer Science and Programming

View the complete course at: http://ocw.mit.edu/6-00F08

Introduction to Computer Science & Programming Class Notes

Data Operations Commands
Numbers + – * / Assignment (Bind a name to a value)
Strings   input/output (Print)
Booleans and, or Conditionals (Branches)
    Loop Mechanisms (While)

Good Programming Style: Use comments. Type discipline (check
types of operands to properly apply correct operations). Descriptive use of good
variable names as a way of documenting code. Testing all possible branches
Read more →

0

MIT Python Programming #6

Lesson 6: Bisection methods, Newton/Raphson, introduction to lists

Massachusetts Institute of Technology (OpenCoarseWare): Introduction to Computer Science and Programming

View the complete course at: http://ocw.mit.edu/6-00F08

Introduction to Computer Science & Programming Class Notes

Bisection methods, Newton/Raphson, introduction to lists

Speed of Convergence
sqrt(x)
f(guess = guess2 -x
f(guess) = 0

As discussed in lesson 5, the best method to find the answer for
differentiable functions is the Netwon/Ralphson Method.

guess i = guess i – f (guess i) / 2 ...

Read more →
0

MIT Python Programming I

Lesson 1: Goals of the course; what is computation; introduction to data types, operators, and variables

Massachusetts Institute of Technology: Introduction to Computer Science and Programming

Instructors: Prof. Eric Grimson, Prof. John Guttag

View the complete course at: http://ocw.mit.edu/6-00F08

License: Creative Commons BY-NC-SA
More information at http://ocw.mit.edu/terms
More courses at http://ocw.mit.edu

Introduction to Computer Science & Programming Notes

Computational Thinking (Write Code)

Understand Code (Read Code)

Map Problems Into Computation (Analysis & Design)

What is Computation? To better answer ...

Read more →
0

Massachusetts Institute of Technology

Massachusetts Institute of Technology OpenCourseWare

Some of us that lack the capabilities either financial or otherwise to succeed at a university. All of us have the ability to advance ourselves both within education and technology thanks to the current digital age of information systems.

MIT’s Open Course Ware gives us the ability to do what previously was impossible, which is, learn from MIT for free

What is MIT OpenCourseWare?
MIT OpenCourseWare is a free publication of MIT course materials that reflects almost ...

Read more →
0
Page 2 of 2 12