Web Developer

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 this question let me first ask you:
What is knowledge?

Their are two types of knowledge:

  1. Declarative
  2. Imperative

Another way to think of a declarative is that…. it is a statement that defines.

Example: X =  √2
The above statement defines the letter x to be
equivalent to the square root of the number 2. This statement does not tell us
how to find the square root, it only makes a definition.

Another way to think of Imperative is a statement that teaches you something, or gives instructions.
Example: IF someone types the number one THEN I want you to PRINT “1-2-3”
The above statement gives you a set of instructions to follow, but no declaration is made.

Earliest Computers

The earliest computers were Fixed Program Computers. This means that they had
a piece of circuitry fixed to do something set on a specific set of rules.

Atanasoff – Developed in 1941 it solved Linear Equations
Turing Bombe (Pronounced BOOM – Alan Turing designed a computer that broke the German Enigma Codes in WWII.

Imagine a computer that could take the programmatic circuitry of any other computer and instantly run that circuitry within itself.
A simple input from another computer and it would output the results in the same

That computer exists and it is known as the stored program computer, or
better known as today's modern computer.
Stored Program Computer

A computer program is a recipe or sequence of instructions.

Touring Compatibility: Anything done in one programming language can be done
in another programming language.

How do you describe the different types of recipes? Programming language.
Examples: C, Matlap, LISP, Phython.

General questions about languages:
High Level or Low Level?
General or Targeted? (Supports a Broad Range of Apps or a Targeted App)
Interpreted or Compiled?

Interpreted: Source Code(Source Code is the code you wrote) goes directly
into interpreter then outputs results.

Compiled: Source code goes to compiler and/or checker, then creates object

Interpreted Languages are easier to debug but do not run as fast. Compiled
languages execute much faster but are more difficult to debug.

Python is a high level, broad range, interpreted langage.

Programming Code Defined:
Syntax: What are the legal expressions? (“cat dog boy”)
Static Semantics: Which expressions make sense? (“My desk is Susan”)

Semantics: What is the meaning of the program? (Good programming style is a must)

Numbers 3(integer) 3.14(floating point)
Strings – type ‘abc’ ‘def3’
Operations =,*,-,/
Variables myString = “Mike Stratton”

The above is my personal notes in regards to this class to help me in the learning process.

  Related Posts