CSC 1010 Programming for All Lecture 1 Some material courtesy of Python for Informatics: Exploring Information (www.pythonlearn.com)

Slides:



Advertisements
Similar presentations
Computer Basics 2.
Advertisements

P3- Represent how data flows around a computer system
Computer Bits and Parts Parts of the computer system.
Computer Hardware.
COMPUTER SYSTEM COMPONENTS ACTIVITY
COMPUTER DEVICES Input Devices Output Devices Storage Devices
Input, Output, Processing and Storage
Systems Software Operating Systems.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Introduction to Computer Administration Introduction.
CHAPTER 1 GC 101 Introduction to computers and programs.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
What is Information Technology?
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Computer Basics Diagram
Today’s Agenda: Computer Basics Review Hardware: The physical components of a computer, any internal or external computer part that you can touch. Software:
Topics Introduction Hardware and Software How Computers Store Data
Why Program? Chapter 1 Python for Informatics: Exploring Information
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
How computers work Learning objective 2: Explain the four basic functions of a computer.
Computers Parts/Types. Topics Definition Types of Computers Parts of Computer System Impact on Society.
GIANFRANCO BARBALACE Y FRANCO CAVIGLIA CATENAZZI1ºB Types and components of a computer systems.
Computer Parts. Two Basic Parts Hardware & Software.
CHAPTER 1 GC 101 Introduction to computers and programs.
Intro to Computers Computer Apps 1.
Computers and Programs Zelle - Chapter 1 Charles Severance - Textbook: Python Programming: An Introduction to Computer Science, John.
Computer A computer is an electronic machine that takes information, processes it,and stores it. Computers are made up of hardware ( monitor, tower, keyboard,
Hardware vs Software Hardware: A physical part of the computer which you can touch. Software: A set of instructions which is run to perform tasks on your.
Why Program? Chapter 1 Python for Informatics: Exploring Information
Elements of a Computer System Understanding Computers.
Computer Basic Vocabulary
C o n f i d e n t i a l 1 Course: BCA Semester: III Subject Code : BC 0042 Subject Name: Operating Systems Unit number : 1 Unit Title: Overview of Operating.
Omputer omponents Exit. software –electronic instructions used to run the computer, also known as programs. hardware –equipment which makes up the computer.
Computers Today.
Parts of the Computer System
Why Program? Chapter 1 Python for Informatics: Exploring Information
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
Intro to Programming Web Design ½ Shade Adetoro. Programming Slangs IDE - Integrated Development Environment – the software in which you develop an application.
1 Software. 2 What is software ► Software is the term that we use for all the programs and data on a computer system. ► Two types of software ► Program.
Looking Inside the Computer System
The Computer System CS 103: Computers and Application Software.
Why Program? Chapter 1 Python for Informatics: Exploring Information
Computer Fundamentals MSCH 233 Lecture 1. What is a computer? A computer is an electronic machine which can accept data in a certain form, process the.
Computer Parts and Functions. How A Computer Works.
ICS2O-What is Computer and Information Science There is a wide variety of definitions for what a computer is or what it does. Our definition for the computer.
By Tom and James. Hardware is a physical part of the system that you can pick up and move. There are two types of hardware, external and internal. External.
Ch 1 - Introduction to Computers and Programming Hardware Terminology Main Memory Auxiliary Memory Drives Writing Algorithms Using Pseudocode Programming.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
COMPUTER SYSTEM A computer system is define as combination of components designed to process data and store files. A computer system consists of four.
24/06/20161 Hardware Processor components & ROM. 224/06/2016 Learning Objectives Describe the function and purpose of the control unit, memory unit and.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Why Program? Chapter 1 Python for Everybody
Technology Applications Mr. Moses
Components of Computer
Topics Introduction Hardware and Software How Computers Store Data
Technology Foundations
Python for Informatics: Exploring Information
08/28/06 parts of the computer.
McGraw-Hill Technology Education
Computer Architecture
CS190/295 Programming in Python for Life Sciences: Lecture 1
Fundamentals of Computer Organisation and Architecture
Looking Inside the Computer System
Topics Introduction Hardware and Software How Computers Store Data
National Diploma in Computer Studies
McGraw-Hill Technology Education
Why Program? Chapter 1 Python for Everybody
Overview of Computer system
Why Program?. What is Code? Software? A Program? A sequence of stored instructions - It is a little piece of our intelligence in the computer - We figure.
08/28/06 parts of the computer.
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

CSC 1010 Programming for All Lecture 1 Some material courtesy of Python for Informatics: Exploring Information (

Why Program?

Computers want to be helpful... Computers are built for one purpose - to do things for us But we need to speak their language to describe what we want done Users have it easy - someone already put many different programs (instructions) into the computer and users just pick the ones we want to use WhatNext? WhatNext? WhatNext? WhatNext?WhatNext? WhatNext? WhatNext?

Programmers Anticipate Needs iPhone Applications are a market iPhone Applications have over 3 Billion downloads Programmers have left their jobs to be full-time iPhone developers Programmers know the ways of the program PickMe! PickMe! PickMe! PickMe!PayMe! PickMe!

Users vs. Programmers Users see computers as a set of tools - word processor, spreadsheet, map, todo list, etc. Programmers learn the computer “ways” and the computer language Programmers have some tools that allow them to build new tools Programmers sometimes write tools for lots of users and sometimes programmers write little “helpers” for themselves to automate a task

Why be a programer? To get some task done - we are the user and programmer Clean up survey data To produce something for others to use - a programming job Fix a performance problem in some software Add guestbook to a web site

What is Code? Software? A Program? A sequence of stored instructions It is a little piece of our intelligence in the computer It is a little piece of our intelligence we can give to others - we figure something out and then we encode it and then give it to someone else to save them the time and energy of figuring it out A piece of creative art - particularly when we do a good job on user experience

Programs for Humans...

Programs for Humans... while music is playing: Left hand out and up Right hand out and up Flip Left hand Flip Right hand Left hand to right shoulder Right hand to left shoulder Left hand to back of head Right ham to back of head Left hand to right hit Right hand to left hit Left hand on left bottom Right hand on right bottom Wiggle Jump

Programs for Humans... while music is playing: Left hand out and up Right hand out and up Flip Left hand Flip Right hand Left hand to right shoulder Right hand to left shoulder Left hand to back of head Right ham to back of head Left hand to right hit Right hand to left hit Left hand on left bottom Right hand on right bottom Wiggle Jump

Programs for Humans... while music is playing: Left hand out and up Right hand out and up Flip Left hand Flip Right hand Left hand to right shoulder Right hand to left shoulder Left hand to back of head Right hand to back of head Left hand to right hip Right hand to left hip Left hand on left bottom Right hand on right bottom Wiggle Jump

Bugs in Programs Programmer Grace Hopper found first bug in a program in 1946 while working in the Harvard University computer lab.

Computer Hardware

Software Software Input and Output Devices CentralProcessingUnit MainMemory SecondaryMemory Generic Computer WhatNext?

Definitions Central Processing Unit: Runs the Program - The CPU is always wondering “what to do next”? Not the brains exactly - very dumb but very very fast Input Devices: Keyboard, Mouse, Touch Screen Output Devices: Screen, Speakers, Printer, DVD Burner Main Memory: Fast small temporary storage - lost on reboot - aka RAM Secondary Memory: Slower large permanent storage - lasts until deleted - disk drive / memory stick WhatNext?

Software Software Input and Output Devices CentralProcessingUnit MainMemory SecondaryMemory Generic Computer WhatNext? if x< 3: print

Software Software Input and Output Devices CentralProcessingUnit MainMemory SecondaryMemory Machine Language WhatNext?

Totally Hot CPU

Hard Disk in Action

Writing a Simple Program

Interactive versus Script Interactive You type directly to Python one line at a time and it responds Script You enter a sequence of statements (lines) into a file using a text editor and tell Python to execut the statements in the file

Program Steps or Program Flow Like a recipe or installation instructions, a program is a sequence of steps to be done in order Some steps are conditional - they may be skipped Sometimes a step or group of steps are to be repeated Sometimes we store a set of steps to be used over and over as needed several places throughout the program (Chapter 4)

Sequential Steps Program: x = 2 print x x = x + 2 print x Output: 24 x = 1 print x x = x + 1 print x When a program is running, it flows from one step to the next. We as programmers set up “paths” for the program to follow.

Conditional Steps Output: Smaller Finis Program: x = 5 if x < 10: print 'Smaller’ if x > 20: print 'Bigger' print 'Finis' x = 5 X < 10 ? print 'Smaller' X > 20 ? print 'Bigger' print 'Finis' Yes

Repeated Steps Output: Blastoff! Program: n = 5 while n > 0 : print n n = n – 1 print 'Blastoff!' n > 0 ? n = n -1 Loops (repeated steps) have iteration variables that change each time through a loop. Often these iteration variables go through a sequence of numbers. No print 'Blastoff' Yes n = 5 print n