ITEC 109 Lecture 3 Intro to programming. Review Problem solving –Stages? –Potential pitfalls.

Slides:



Advertisements
Similar presentations
Programming for Beginners
Advertisements

Announcements You survived midterm 2! No Class / No Office hours Friday.
Overview of Programming and Problem Solving ROBERT REAVES.
Chapter Chapter 4. Think back to any very difficult quantitative problem that you had to solve in some science class How long did it take? How many times.
LECTURE 1 CMSC 201. Overview Goal: Problem solving and algorithm development. Learn to program in Python. Algorithm - a set of unambiguous and ordered.
Lecture 0 CSIS10A Overview. Welcome to CSIS10A (5 mins) – Typical format for class meetings New material first (monitors off, notebooks out) Practice.
Starting Out with C++, 3 rd Edition 1 Chapter 1. Introduction to Computers and Programming.
Lecture 1: Intro to Computers Yoni Fridman 6/28/01 6/28/01.
Computing Components 01/26/11. Announcements & Reminders Programs 1 due Friday, 9/2/11 What is my late policy? Proxy Codes for Labs  You should be able.
Compilers and Interpreters. Translation to machine language Every high level language needs to be translated to machine code There are different ways.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
1 Programming Languages Examples: C, Java, HTML, Haskell, Prolog, SAS Also known as formal languages Completely described and rigidly governed by formal.
Introduction to Programming (in C++) Introduction Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC.
CHAPTER 1 GC 101 Introduction to computers and programs.
Assembly & Machine Languages
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
Introduction to Computers and Python. What is a Computer? Computer- a device capable of performing computations and making logical decisions at speeds.
Startup – Chapter 1.
CS 0004 –Lecture 1 Wednesday, Jan 5 th, 2011 Roxana Gheorghiu.
High-level Languages.
Madiha Liaqat Lecturer, UET, Taxila Programming Fundamentals.
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
Python Programming, 2/e1 Python Programming: An Introduction to Computer Science Chapter 1 Computers and Programs.
CHAPTER 1 GC 101 Introduction to computers and programs.
What have mr aldred’s dirty clothes got to do with the cpu
CENTRAL PROCESSING UNIT – a,b,c & d a - The Purpose of a CPU The CPU is the brain of the computer. The Purpose of the CPU is to process.
Overview of Programming and Problem Solving Textbook Chapter 1 1.
Logic and Systems A beginner’s guide.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Fall 2006Slides adapted from Java Concepts companion slides1 Introduction Advanced Programming ICOM 4015 Lecture 1 Reading: Java Concepts Chapter 1.
The Central Processing Unit (CPU) and the Machine Cycle.
B.Ramamurthy11/9/20151 Computers and Programming Bina Ramamurthy 127 Bell Hall
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CHAPTER 1 INTRODUCTION 1 st semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
Review, Pseudocode, Flow Charting, and Storyboarding.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
12/4/20151 Introduction To Computer Science Bina Ramamurthy.
Intro to Programming Web Design ½ Shade Adetoro. Programming Slangs IDE - Integrated Development Environment – the software in which you develop an application.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
Lecture 2 Programming life cycle. computer piano analogy Piano + player - computer hardware Musical score/notes - software or program Composer - programmer.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 5 Repetition.
CSC 1010 Programming for All Lecture 1 Some material courtesy of Python for Informatics: Exploring Information (
Ch 1 - Introduction to Computers and Programming Hardware Terminology Main Memory Auxiliary Memory Drives Writing Algorithms Using Pseudocode Programming.
1 Overview of Programming Principles of Computers.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
CS 177 Recitation Week 1 – Intro to Java. Questions?
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Chapter 1 Introduction 2nd Semester H
COSC 1306 COMPUTER SCIENCE AND PROGRAMMING
hardware bits and bytes Java
Lecture 1: Introduction to JAVA
Topics Introduction to Repetition Structures
A451 Theory – 7 Programming 7A, B - Algorithms.
Course: Introduction to Computers
Chapter 1: An Overview of Computers and Programming Languages
CS190/295 Programming in Python for Life Sciences: Lecture 1
Software Programming J. Holvikivi 2014.
Mobile Development Workshop
Loops CIS 40 – Introduction to Programming in Python
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Problem Solving Designing Algorithms.
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Understand the interaction between computer hardware and software
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Week 1 - Friday COMP 1600.
Presentation transcript:

ITEC 109 Lecture 3 Intro to programming

Review Problem solving –Stages? –Potential pitfalls

Intro to programming Objectives Mental model of languages Relationship with hardware What you can and can’t do

Intro to programming Computers What is on the inside? What do the parts do?

Intro to programming Binary Computers speak binary Command => Result CPU –Registers –Calculations Memory Hard drives Graphic cards

Intro to programming Old way Figure out the binary for the command you wanted Figure out where to get the input Figure out where to put the output Put it together Result – Long programs?

Intro to programming Frustration Speaking in binary isn’t appealing Work faster if we speak in natural languages Assembly=>Java=>Python Translation –Ambiguity issue

Intro to programming Language s Abstract away from hardware Whole greater than sum of parts Several variations –6000+ languages in the world –Over 300 listed on Wikipedia

Intro to programming Classificatio n Compiled –Java Scripting –Python

Intro to programming Component s Languages have constructs –Variables –Flow control –Grouping Sentence => Statement Statement => Constructs Program has many statements

Intro to programming Types of statements Create resources Modify resources Alter the flow –Ignore a few statements –Go back and repeat some of them again

Intro to programming Mental model 1.x=3; 2.Number = raw_input(‘Enter a number’); 3.printNow( “You picked “ + Number); 4.printNow(“ The computer picked”‘ + x); Linear list Programs start at a particular line and execute one after the other as fast as possible

Intro to programming Mental model Branching x=3;x=4; Looping x=x+1; print ‘x’ print ‘Time to go around again’

Intro to programming Mental Model Process Order Process Order Ship Order Ship Order start

Intro to programming Process Read the problem Work through it by hand Make sure you can envision how it will work before you start Writing statements before mentally seeing the light at the end of the tunnel = BAD

Intro to programming Design Formalize what you know about the program Write down what statements / grouping is needed Work out math beforehand if needed Think how to test the software

Intro to programming Implementatio n Write a few statements, check Write on paper first, then computer Read code and see what it does in your mind

Intro to programming Testing Figure out what could go in, what goes out Make test cases Run them Modify statements when you are finished

Intro to programming Help Peer tutors Office hours Friends (though only specific questions)

Intro to programming Review Computer hardware Languages Statements