Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Class 1: What this course is about

2 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 on p 33

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

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

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

6 What is a program? A program is a set of instructions written in a computer language 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)

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

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

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

10 The interpreter An interpreter translates from a high-level language to the computer’s language (instruction set) The Python shell interprets line by line. A line of computer code can not be translated and executes unless it is syntactically (grammatically) correct

11 Debugging Just because you’ve written some code doesn’t mean you’ve solved your problem. Testing is the process of trying to discover errors in your program. Debugging is the process of fixing errors you discover. (The sentence ‘Colorless green ideas sleep furiously’ is grammatically correct, but what does it mean? Look in up on the Web.)

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

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

14 Getting help Use the online help system Every CA and instructor has office hours Sign up for one of the study/homework sessions (hint: best right after class) Learn to work with a partner or team as well as to tackle problems on your own.

15 Grading Homework (almost every class) 15% Roadmap projects 15% Midterm 1 20% Midterm 2 20% Final 25% Misc5% All sections have same work and tests Course is graded on a curve

16 Attendance Lecture attendance is mandatory (you are asked to sign in). Five absences will lead to withdrawal

17 Homework HWs are handed in paper (hard copy) and electronically No late HWs will be accepted Every HW hard copy must be neatly printed and stapled Every HW must have student name and ID, date, HW # and section #

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


Download ppt "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."

Similar presentations


Ads by Google