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 branchesRead more →