20.179: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
Line 43: Line 43:
#*Several non-coded examples
#*Several non-coded examples
#*Coded example with basic syntax (___init___, easy member functions and data structures)
#*Coded example with basic syntax (___init___, easy member functions and data structures)
#Anything else we want to cover
#2-3 day Project (groups of 2-3)


Comments? Suggestions?


 
WORK IN PROGRESS - 9/28 18:35 EST
 
 
WORK IN PROGRESS - 9/28 18:15 EST

Revision as of 15:33, 28 September 2006

Introduction to Programming, January 2007

This student-run course ("20.179") is desgined to provide an introduction to computer programming for those with absolutely no programming experience. The course focuses on the thought process behind writing programs, and aims to separate the tasks of algorithm design and implementation. 20.179 is designed for sophomores in Biological Engineering, but will benefit anyone who seeks an introduction to computer programming.

Workload

Two hours a day for 9 days should be sufficient, depending on the amount of material we want to include. Problem sets would be given nightly, collected the next day, and graded, and would be designed to take no more than an hour to complete. They would also be discussed at the beginning of class for ~10 minutes each day as a review of the previous material.

WORK IN PROGRESS - 9/28 18:15 EST

List of Concepts

  1. Thinking in Algorithms
    • What is an algorithm?
    • What tools are there?
      • Data structures: int, float, str, char (save list, dict for later)
      • operations: +, -, concatenate, =, etc.
      • logic: ==, !=, <, >, or, etc.
    • Python IDLE GUI: intro to error messages and the debugger
    • "Hello World" in Python versus some other examples
    • Intro to Python online help
  2. Common progamming instructions
    • Conditionals: if...else
    • Simple algorithms with if...else
    • Loops - a conditional that runs i times or until a condition is true
      • For vs. while (same result, different logic and code)
    • Several examples with loops/if...else
  3. Tools for decomposing difficult problems
    • Concept of a function as an independent algorithm
    • Pseudocode functions - miniature programs
    • Writing and using functions in Python
  4. More advanced manipulation of data types
    • Re-introduce Python help
    • Discuss a problem that requires use of built-in str functions, then find those and implement it
    • Introduction of list and dict types
    • File I/O and runtime user input (raw_input())
    • Type casting
  5. Recursion and computational time
    • Mathematical recursion - factorial, etc.
    • Recursion in computational algorithms
    • Speed - intuitive fact() function is O(2^n) - but this can be corrected!
    • The dorm arrangement + prefs list problem, also 2^n, but can't be changed.
  6. Classes
    • Why are they useful? Makes representing complex data easy
    • Several non-coded examples
    • Coded example with basic syntax (___init___, easy member functions and data structures)
  7. Anything else we want to cover
  8. 2-3 day Project (groups of 2-3)

Comments? Suggestions?

WORK IN PROGRESS - 9/28 18:35 EST