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