Introduction to Computer Programming - Table of Contents

  1. Introduction to course
    1. Few words about motivation of programming. Why programming is unique skill. How a program is wealth. Programs as our workers. Programmer create workers. A program is written once and sold number of times. Sohail example.
    2. Questions are important than answers, feel free to ask during class.
    3. We do 3 things to acheive a target: action/steps, decision, repeat
    4. What is programming, understanding with the help of how our mind work when we write table of 2
    5. Practice would make you programmer. This skill can't be developed without practice of writing new programs.
    6. A computer programs is a set of instructions.
    7. What is JavaScript, why its so popular. Benefits of learning JavaScript in this diploma.
    8. Writing "Hello World" program in JavaScript. How to write and run it.
    9. Understanding how a program can print table of 2.
  2. Variables, Constants, Operators and Expressions
    1. Variable and Constant
      1. How to declare and initialize a variable and constant.
      2. What is null and undefined.
    2. Programs are executed from top to bottom, statement by statement.
    3. Arithmetic Operators:
      1. Additive Operators: +, - 
      2. Multiplicative Operators: /, *, % 
      3. Pre and Post Increment and Decrement Operators: ++, -- (evaluation examples)
      4. Compound Assignment Operators: +=, -=, /=, *=, %= 
      5. Examples of arithmetic expressions: Area of rectangle and cirlce: length * width, πr2Circumference of rectangle, circle: 2(length + width), 2πr
    4. Expression and Precedence OrderHow an expression is written and evaluated.
    5. Relational Operators: ==,  !=,  <,   >,  <=,  >= 
      1. Always produce true or false
      2. Also called binary operators, because 2 operands are used
    6. Logical Operators: !, &&, | | 
      1. How AND, OR and NOT are evaluated
      2. Logical AND, OR are Short Circuit operators. Short circuit evaluation.
      3. Precedence of && is higher than | |
      4. Concept of Falsy and Truthy in JS. When a boolean expression contains truthy or falsy, how the value to be returned is decided.
      5. How to convert Truthy and Falsy value to boolean value i.e. true or false
  3. Decisions. Execute instructions based on some condition
    1. Facilitate 2 teams play cards game: Is Card Red. Write and explain how our mind actually runs a program.
    2. if: What is if. Conditional part and body of if statement. How to write single and multiple statements in body. 10-15 example programs to understand how if work.
    3. if-else: When if-else is used. Example programs to understand how if-else work
    4. if-else-if, example programs to understand how if-else-if work