 Lesson 03: Computer Programming. The Algorithm A List of Well-Defined Instructions for Completing a Task.

Slides:



Advertisements
Similar presentations
Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming.
Advertisements

Presentation II History of Computers By Teacher Julio Cesar Peñaloza Castañeda.
Computers Are Your Future
CS105 INTRODUCTION TO COMPUTER CONCEPTS INTRO TO PROGRAMMING Instructor: Cuong (Charlie) Pham.
The Binary Machine Modern high-level programming languages are designed to make programming easier. On the other end, the low level, all modern digital.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Comp 205: Comparative Programming Languages Imperative Programming Languages Functional Programming Languages Semantics Other Paradigms Lecture notes,
An Introduction to Programming with C++ Fifth Edition Chapter 1 An Introduction to Programming.
SOFTWARE SYSTEMS SOFTWARE APPLICATIONS SOFTWARE PROGRAMMING LANGUAGES.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Building Applications.
Computer Programming Putting the machine under our command.
© Paradigm Publishing Inc Chapter 12 Programming Concepts and Languages.
History of Programming Languages
1 Programming Language Concepts Ethics Why study concepts of programming languages (PLs)? PL categories Influences on PL design Problem areas & needs that.
Introduction to Programming Language CS105 Programming Language First-generation: Machine language Second-generation: Assembly language Third-generation:
Programming Languages
There are only 10 types of people in the world, those who understand binary and those who don't.
CIS Computer Programming Logic
AS Computing Introduction to Programming. What is a Computer Program? A list of instructions that a computer must work through, in a logical sequence,
Programming Language Rico Yu. Levels of Programming Languages 1.Low level languages 2.High level languages.
Evolution of Programming Languages Generations of PLs.
COMPUTER PROGRAMS AND LANGUAGES Chapter 4. Developing a computer program Programs are a set (series) of instructions Programmers determine The instructions.
CS 330 Programming Languages 09 / 04 / 2008 Instructor: Michael Eckmann.
COMPUTER PROGRAMMING I SUMMER 2011 Programming Languages.
Programming Languages 1.07a.  A computer program is a series of instructions that direct a computer to perform a certain task.  A programming language.
Computer Programming 1. Evolution of Computers Components of Computers Programming Languages Important People Javascript Round 2.
Programming History. Who was the first programmer?
The Teacher Computing Computer Languages [Computing]
Discovering Computers 2009 Chapter 13 Programming Languages and Program Development.
Chapter 6 Programming Languages © 2007 Pearson Addison-Wesley. All rights reserved.
1 Week 1: The History of Computing: Software READING: Chapter 1.2.
Programming Languages – An introduction. There are 10 types of people in the world −Those who understand binary −Those who don’t.
Software Basics. Some Pioneers Charles Babbage Analytical Engine Countess Ada Lovelace First Programmer ? John Von Neumann storing instructions in memory.
Tolo-e-aftab higher education 1 th semester Bcs 1/2/1392 MINISTRY OF HIGHER EDUCATION.
Programming Language 1. Programming language A programming language is a machine-readable artificial language designed to express computations that can.
2016 N5 Prelim Revision. HTML Absolute/Relative addressing in HTML.
CS 111 – Nov. 5 Sorting –Selection and Bubble √ –insertion: place next element in correct place by shifting over other ones to make space –Merge: Repeatedly.
Programming Languages
int k = Integer.MAX_VALUE; k++; int k = Integer.MAX_VALUE; k++; What happens when the following code executes? byte b = someFile.readByte(); b = (byte)(b.
Software Engineering Algorithms, Compilers, & Lifecycle.
Programming Language Paradigms ITSK2314 Lecture 3.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
History. Development Driven by Function Functions of a Programming Language –To describe computation for use by computers –To describe computation and.
CPS120 Introduction to Computer Science High Level Language: Paradigms.
Computer Languages [Computing] Computing.
The language focusses on ease of use
Why study programming languages?
Basic 1964 PC general purpose Imperative Small Easy to use.
Quick one: Do you know what these are?
Comp 205: Comparative Programming Languages
Programming Concepts and Languages
Objectives Overview Differentiate between machine and assembly languages Identify and discuss the purpose of procedural programming languages, and describe.
Developing Applications
Chapter 12 Programming Concepts and Languages.
CMPT 360 Programming Languages (Notations)
صياغة البرامج ولغات البرمجة Programming & programming languages
CS105 Introduction to Computer Concepts Intro to programming
Unit 6 part 3 Test Javascript Test.
Chapter 6: Programming Languages
Introduction to Computer Programming
and Program Development
Von Neumann Architecture
An Introduction to Programming with C++ Fifth Edition
CS105 Introduction to Computer Concepts Intro to programming
Computer Programming (CS101) Lecture-02
CHAPTER 1 THE ABC OF PROGRAMMING
Presentation transcript:

 Lesson 03: Computer Programming

The Algorithm A List of Well-Defined Instructions for Completing a Task.

Algorithm to Bake a Cake

How Detailed Does an Algorithm Need to Be?

Troubleshooting Algorithm

Boolean Logic

Logic Gates Logic Gates Venn Diagrams

Combining Logic Gates

Nerd Venn Diagram

History of Computer Languages

First Computer Program Ada Lovelace

First Actual Computer Bug Grace Murray Hopper, 1945

Punch Cards

Machine Languages (1GL) Binary Instructions for a Specific CPU

Assembly Languages (2GL) Mnemonic Instructions (CPU Specific)

Fortran, ALGOL, COBOL (3GL) COBOL Coding Form Instruction Explosion, Machine Independence

Modern Programming Languages Visual Basic, SQL (4GL): Higher Instruction Explosion, database support Lisp, Prolog (5GL): Expert Systems, Artificial Intelligence applications C++, Java (Object-Oriented (OOP)): code reuse VBScript, JavaScript, PHP (Scripting): web development

Family Tree of Programming Languages

Programming Concepts

VariablesExamples VARCHAR / CHAR “John Smith”, “TEST”, “ABC123” INTEGER / DECIMAL / FLOAT 1234, , , -400, 10.01, BOOLEAN True/False, 0/1 DATE / TIME 03/14/ :59:26 ARRAY colors{red, orange, yellow, green, blue, indigo, violet}

Conditional Logic IF / THEN SWITCH / CASE FOR LOOP WHILE LOOP

Sample Program: Bubble Sort var cards=new Array(); cards[0] = 4; cards[1] = 12; //Queen cards[2] = 8; cards[3] = 5; cards[4] = 11; //Jack cards[5] = 10; cards[6] = 14; //Ace cards[7] = 9; cards[8] = 13; //King cards[9] = 6; cards[10]= 3; cards[11]= 7; cards[12]= 2; function swapCards(cards, firstIndex, secondIndex) { var temp = cards[firstIndex]; cards[firstIndex] = cards[secondIndex]; cards[secondIndex] = temp; } function bubbleSort(cards) { var len = cards.length; var cardsSorted = false; while (cardsSorted == false) { cardsSorted = true; for (i=0; i < len; i++) { if (cards[i] > cards[i+1]) { swapCards(cards, i, i+1); cardsSorted = false; } return cards; } FUNCTION INTEGER BOOLEAN LOOP IF/THEN ARRAY

Cut and Paste Programming TIC TAC TOE – Number Version – Hard Conditional Logic Version – Intelligent Version Game of Life Super Mario World in JavaScript

JavaScript Game Resources ist_test.asp ist_test.asp html html