Class 1: What this course is about. Assignment Read: Chapter 1 Read: Chapter 1 Do: Chapter 1 ‘workbook’ pages not finished in class Do: Chapter 1 ‘workbook’

Slides:



Advertisements
Similar presentations
Designing a Program & the Java Programming Language
Advertisements

Beginning Keyboarding BSAD B252a to the orientation for the beginning keyboarding class! This presentation gives you important information about the course.
COMPUTER PROGRAMMING Task 1 LEVEL 6 PROGRAMMING: Be able to use a text based language like Python and JavaScript & correctly use procedures and functions.
Creating a Program In today’s lesson we will look at: what programming is different types of programs how we create a program installing an IDE to get.
1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Fall 2011 Section 4 Richard Chang.
CS150 Introduction to Computer Science 1 Professor: Chadd Williams.
Lecture 1: Intro to Computers Yoni Fridman 6/28/01 6/28/01.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
CS101- Lecture 11 CS101 Fall 2004 Course Introduction Professor Douglas Moody –Monday – 12:00-1:40 – – –Web Site: websupport1.citytech.cuny.edu.
CS211 Data Structures Sami Rollins Fall 2004.
Class 1: What this course is about. Assignments Reading: Chapter 1, pp 1-33 Do in Class 1: –Exercises on pages 13, 14, 22, 28 To hand in in Class 2: –Exercises.
OBJECT ORIENTED PROGRAMMING I LECTURE 1 GEORGE KOUTSOGIANNAKIS
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
Course Introduction and Getting Started with C 1 USF - COP C for Engineers Summer 2008.
Genome Sciences 373 Genome Informatics Quiz Section #1 March 31, 2015.
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217.
PYTHON: LESSON 1 Catherine and Annie. WHAT IS PYTHON ANYWAY?  Python is a programming language.  But what’s a programming language?  It’s a language.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
Thanks to: Dr. John S. Mallozzi Department of Computer Science 1. Introduction 2. Overview of programming in Python.
Python Mini-Course University of Oklahoma Department of Psychology Day 1 – Lesson 2 Fundamentals of Programming Languages 4/5/09 Python Mini-Course: Day.
Introduction to Python Dr. Bernard Chen Ph.D. University of Central Arkansas July 9 th 2012
Introduction COMP104: Fundamentals and Methodology.
CS110/CS119 Introduction to Computing (Java)
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
CS105 Lab 1 – Introduction Section: ??? TA: ??? ??? Announcements CITES Accounts Compass Netfiles Other Administrative Information CS105 Fall
COMP Introduction to Programming Yi Hong May 13, 2015.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Python Programming, 2/e1 Python Programming: An Introduction to Computer Science Chapter 1 Computers and Programs.
Instructor: Tina Tian. About me Office: RLC 203A Office Hours: Wednesday 1:30 - 4:30 PM or .
Introduction to Programming Peggy Batchelor.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Programs, programs, everywhere! This is a starter activity and should take 5 minutes 1.Open up a text editor such as Notepad. 2.Write a list of all the.
COMP 171: Principles of Computer Science I John Barr.
CGS-2531 Problem Solving with Computer Software Course home page: Course.
CS 114 – Class 02 Topics  Computer programs  Using the compiler Assignments  Read pages for Thursday.  We will go to the lab on Thursday.
Python From the book “Think Python”
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
Welcome to CS 115! Introduction to Programming. Class URL Write this down!
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
Introduction to Python Lesson 1 First Program. Learning Outcomes In this lesson the student will: 1.Learn some important facts about PC’s 2.Learn how.
ECET – Dynamic Programming with Python Spring 2013 Lecture L1 – Introduction to Python Page 1 Welcome! This is Professor Jai P. Agrawal. I will walk.
Intermediate 2 Computing Unit 2 - Software Development.
CSC 1010 Programming for All Lecture 2 Introduction to Python Some material based on material from Marty Stepp, Instructor, University of Washington.
Syllabus Highlights CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
PROBLEM SOLVING AND PROGRAMMING ISMAIL ABUMUHFOUZ | CS 170.
Chapter 1: Introduction to Computers and Programming.
Getting Started With Python Brendan Routledge
CSC 241: Introduction to Computer Science I
CMPT 201 Computer Science II for Engineers
Development Environment
CSc 1302 Principles of Computer Science II
Introduction to Programming
Key Ideas from day 1 slides
Topics Introduction to Repetition Structures
Week 1 Gates Introduction to Information Technology cosc 010 Week 1 Gates
CS190/295 Programming in Python for Life Sciences: Lecture 1
Task 1 Computer Programming LEVEL 6 PROGRAMMING:
Syllabus Highlights CSE 1310 – Introduction to Computers and Programming Alexandra Stefan University of Texas at Arlington.
Chapter 1: Programming Basics, Python History and Program Components
Starter Which of these inventions is: Used most by people in Britain
CSCI 203: Introduction to Computer Science I
Lecture 1 Class Overview
ICS103 Programming in C 1: Overview of Computers And Programming
CSC 241: Introduction to Computer Science I
Presentation transcript:

Class 1: What this course is about

Assignment Read: Chapter 1 Read: Chapter 1 Do: Chapter 1 ‘workbook’ pages not finished in class Do: Chapter 1 ‘workbook’ pages not finished in class You should know: You should know: How to use the command line How to use the command line How to create and save a file How to create and save a file if … else if … else while while Role of indenting Role of indenting What is a function (e.g., print(), input() ) What is a function (e.g., print(), input() ) What is a parameter What is a parameter

In a nutshell (Thread 1) This course is about writing computer programs that solve problems This course is about writing computer programs that solve problems First step: ‘grok’ the problem. (Look up the meaning and origin of ‘grok’.) First step: ‘grok’ the problem. (Look up the meaning and origin of ‘grok’.) Second step: write the program Second step: write the program Third step: make sure the program correctly solves the problem Third step: make sure the program correctly solves the problem

In a nutshell (Thread 2) This course is about some of the high points on the terrain of computing. For example: This course is about some of the high points on the terrain of computing. For example: What is computing? What is computing? How does the Internet work? How does the Internet work? How do hardware and software work together? How do hardware and software work together? … and more … and more

What is an algorithm? An algorithm is an unambiguous, step-by-step procedure for solving a problem An algorithm is an unambiguous, step-by-step procedure for solving a problem A recipe is an example of an algorithm A recipe is an example of an algorithm An algorithm provides the design for a computer program An algorithm provides the design for a computer program

What is a computer language? A computer language is a way of writing down algorithms A computer language is a way of writing down algorithms ‘High level’ languages are readable, like natural human languages ‘High level’ languages are readable, like natural human languages Computer languages are precise enough to be executed by (unthinking) machines Computer languages are precise enough to be executed by (unthinking) machines All computer languages are fundamentally equivalent in their expressive power All computer languages are fundamentally equivalent in their expressive power

What is a program? A program is a set of instructions written in a computer language A program is a set of instructions written in a computer language A program implements an algorithm A program implements an algorithm A program written in a high-level language may be translated into a low level language (the natural language of a computer) A program written in a high-level language may be translated into a low level language (the natural language of a computer)

What is a computer? A computer is a machine which executes programs (unlike a lawn mower) A computer is a machine which executes programs (unlike a lawn mower) A computer can execute any program (unlike a CD-player) A computer can execute any program (unlike a CD-player) Since computers are Universal Machines, they are all fundamentally equivalent in computing power Since computers are Universal Machines, they are all fundamentally equivalent in computing power

How do you write a program? A computer can execute programs that are tools for creating programs A computer can execute programs that are tools for creating programs The programmer’s everyday tools might include: The programmer’s everyday tools might include: editor editor compiler compiler debugger debugger A suite of such tools is called an integrated development environment (IDE) A suite of such tools is called an integrated development environment (IDE) We are using the Python language and IDLE IDE We are using the Python language and IDLE IDE

The editor An editor is used to write programs An editor is used to write programs Programs are written in plain text Programs are written in plain text The file containing the program in a high-level language is called the source file The file containing the program in a high-level language is called the source file A Python source file usually has the extension ‘.py’ A Python source file usually has the extension ‘.py’

The interpreter An interpreter translates from a high-level language to the computer’s language (instruction set) An interpreter translates from a high-level language to the computer’s language (instruction set) Interpreters usually translate and execute code line by line Interpreters usually translate and execute code line by line A source file can not be interpreted and executed unless it is syntactically (grammatically) correct A source file can not be interpreted and executed unless it is syntactically (grammatically) correct

The devlopment environment We will be working in the Python integrated development environment called IDLE We will be working in the Python integrated development environment called IDLE IDLE contains an interactive environment in which you can write and execute instructions line by line IDLE contains an interactive environment in which you can write and execute instructions line by line IDLE also contains an editor to write and store programs and a debugger to help correct programs IDLE also contains an editor to write and store programs and a debugger to help correct programs

The debugger A debugger allows you to ‘step through’ the program, viewing the changing values A debugger allows you to ‘step through’ the program, viewing the changing values A debugger aids in finding and correcting logical errors. A debugger aids in finding and correcting logical errors. (The sentence ‘Colorless green ideas sleep furiously’ is grammatically correct, but what does it mean? Look in up on the Web.) (The sentence ‘Colorless green ideas sleep furiously’ is grammatically correct, but what does it mean? Look in up on the Web.)

Panic abatement advice Expect to spend lots of time Expect to spend lots of time Programmer wisdom: it always takes longer than you think Programmer wisdom: it always takes longer than you think Expect things to go wrong Expect things to go wrong Murphy’s law of computers: anything that can’t go wrong, will Murphy’s law of computers: anything that can’t go wrong, will Don’t panic: every bug has a fix Don’t panic: every bug has a fix

Tips for success Start every assignment early Start every assignment early Don’t fall behind Don’t fall behind Ask if you don’t know Ask if you don’t know Do your own work Do your own work

Getting help Use the online help system Use the online help system Every TA and instructor has office hours Every TA and instructor has office hours There are tutors available (check the course web site) There are tutors available (check the course web site) My contact info: My contact info: Barry Cohen Barry Cohen 3503 GITC 3503 GITC Tues, Thurs 2:30-3:30 Tues, Thurs 2:30-3:30

Grading Homework (6) 15% Homework (6) 15% Projects (2) 15% Projects (2) 15% Midterm 1 20% Midterm 1 20% Midterm 2 20% Midterm 2 20% Final 25% Final 25% Participation 5% Participation 5% All sections have same work and tests All sections have same work and tests Course is graded on a curve Course is graded on a curve

Attendance Attendance is mandatory (you are asked to sign in). Five absences will lead to withdrawal Attendance is mandatory (you are asked to sign in). Five absences will lead to withdrawal Arriving late or leaving early counts for ½ of an absence Arriving late or leaving early counts for ½ of an absence

Homework HW assignments are approximately bi-weekly HW assignments are approximately bi-weekly HWs are handed in at the start of class HWs are handed in at the start of class No late HWs will be accepted No late HWs will be accepted Every HW must be in hard copy – code and output, neatly printed and stapled Every HW must be in hard copy – code and output, neatly printed and stapled Every HW must have student name and SS#, date, HW # section # Every HW must have student name and SS#, date, HW # section #

Honesty Cheating on an exam will result in failing the course Cheating on an exam will result in failing the course You may discuss HW problems with each other You may discuss HW problems with each other You may not take credit for something you did not do You may not take credit for something you did not do

Logging On Linux/Unix, Mac or Windows Linux/Unix, Mac or Windows UCID UCID Password Password Password problem? Password problem? Unattended Password Reset (UPR) Unattended Password Reset (UPR)

Introduction To Python What is Python? What is Python? Very high level language (HLL) Very high level language (HLL) Scripting language Scripting language Why use Python? Why use Python? Powerful and fast Powerful and fast Runs everywhere Runs everywhere Easy to learn Easy to learn Easy to read Easy to read Encourages good programming practices Encourages good programming practices

The Python Interpreter Linux/Unix Linux/Unix Open a terminal window Open a terminal window Type ‘python’ or ‘idle3’ at a command prompt Type ‘python’ or ‘idle3’ at a command prompt Or double click icon Or double click icon Windows Windows Go to Start > Programs > Python3 > Idle Go to Start > Programs > Python3 > Idle Or double click icon Or double click icon Mac Mac Open from terminal or double click icon Open from terminal or double click icon

Python As A Calculator Python can perform all basic arithmetic operations Python can perform all basic arithmetic operations How many minutes in a year? How many minutes in a year? How many seconds since the universe began 13 billion years ago? How many seconds since the universe began 13 billion years ago?

The IDLE environment You can use IDLE to assign values to an identifier (i.e., a name) You can use IDLE to assign values to an identifier (i.e., a name) >>> x = 5 An IDLE session has a memory An IDLE session has a memory >>> x 5 >>> y = x >>> y 5 You can the change the value assigned to an identifier You can the change the value assigned to an identifier >>> x = 'five' >>> x 'five'

Your First Python Program Type print(‘Hello, World!’) and then press the enter key Type print(‘Hello, World!’) and then press the enter key The Python interpreter prints ‘Hello, World!’ on the screen The Python interpreter prints ‘Hello, World!’ on the screen

More about Hello, World print() is a function print() is a function A function is a named block of code A function is a named block of code A function hides how it works from the outside world A function hides how it works from the outside world ‘Hello, World’ is a parameter ‘Hello, World’ is a parameter A parameter is ‘handed’ to a function A parameter is ‘handed’ to a function A parameter is in parens, after the function name A parameter is in parens, after the function name Try print () and (‘‘) Try print () and (‘‘) Try print (‘hello‘, ‘and goodbye‘) Try print (‘hello‘, ‘and goodbye‘) Try print Try print

Our textbook Head First Programming Head First Programming This book incorporates workbook material that we will do in class This book incorporates workbook material that we will do in class Let’s go through Chapter 1 Let’s go through Chapter 1