add text 1.1.3

pull/357/head
Eric Douglas 2014-05-20 19:12:05 -03:00
parent 908e600e97
commit 58b2670ad7
1 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,32 @@
# 1.1.3 Problem Solving
⬅ [Back to table of contents](https://github.com/ericdouglas/MIT-computer-science/tree/master/archives/01-introduction-to-computer-science-and-programming#table-of-contents)
## Session Overview
This lecture covers the use of iteration to build programs whose execution time depends upon the size of inputs. It also introduces search problems and brute force and bisection for solving them.
## Session Activities
### Lecture Videos
* [Lecture 3: Problem Solving](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/unit-1/lecture-3-problem-solving/#?w=535) (00:47:56)
* **About this video**: Topics covered: Termination, decrementing functions, exhaustive enumeration, brute force, while loop, for loop, approximation, specifications, bisection search.
* **Resources**
* [code in Pyhton]()
## Check Yourself
### **What does it mean for a program to terminate?**
Either the program will return a value, or throw an exception. A program that does not terminate runs indefinitely, typically because it's gotten stuck in a loop.
### What is a `for` loop?
A `for` loop takes some sort of iterable object (a list, tuple, or string) and performs its function once for each item in that object. Any function that depends on the input can have a different result at each step, since the input is the current item.
## Further Study
**Readings**
* [Loops](http://beastie.cs.ua.edu/cs150/book/index_14.html). An Introduction to Python.