Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
General Computer Science for Engineers CISC 106 Lecture 01 Dr. John Cavazos Computer and Information Sciences 09/01/2010 Course Overview Unit 1 : How to write a proper program ◦ Using design recipes Unit 2 : More programming ◦ Iteration, Recursion, Searching, Sorting, etc. Unit 3 : Numeric Programming ◦ Matlab Sakai : Course syllabus, assignments, etc. TAs : Marcos Portnoi, Ashwani Rao Labs Labs on Monday ◦ Pearson Hall 101D ◦ First Lab : week after next Monday First two labs are solo Remaining labs done in pairs Labs assigned Fridays and due 9 days later (Sunday) after assigned Grading Grading: ◦ ◦ ◦ ◦ ◦ Final (15%) Two midterms (15% + 15%) Two projects (5% + 10%) Labs (30%) Activities and Participation (5% + 5%) Project 1 done in a pair Project 2 in teams of 4 Computer Technology Space Shuttle, 1985 - 25 years ago - Powerful computer onboard - Can calculate entry into Earth Slides based on Lazowska’s FCRC 2007 Talk. Computer Technology Pleo, 2006 - Has more powerful computers Note : Xbox 360 is 200x more powerful. Slides based on Lazowska’s FCRC 2007 Talk. Software technology also changing! Slides based on Lazowska’s FCRC 2007 Talk. Software technology also changing! Deep Fritz, 2002 Slides based on Lazowska’s FCRC 2007 Talk. Computing has change the world! - Advances in computing change the way we live, work, learn, and communicate -Advances in computing drive advances in nearly all other fields - Advances in computing power our economy Slides based on Lazowska’s FCRC 2007 Talk. Exciting Times Ahead The next ten years of advances in computer science could be far more significant, and far more interesting, than the past ten! Slides based on Lazowska’s FCRC 2007 Talk. Python Introduction •Enthought distribution (Do not use 64-bit version!) •Integrated DeveLopment Environment (IDLE) –Automatically installed when Python language is installed –It has a built-in text editor –IDLE editor colorizes code Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Expressions >>> 2 2 >>> 3 + 2 5 Note: Can use the usual operators. +, -, /, * exponentiation is **. >> 2 ** 3 8 Expressions (cont’d) Can combine and nest expressions >>> 3 + 2 * 2 # what does this evaluate to? 7 Operator precedence. ** then * and / then + and 1 Use parenthesis if necessary. >> ( 3 + 2) * 2 10 Expressions (cont’d) Some built-in functions available : pow, abs >>> pow (2 , 3) 8 For math functions need to do the following : >>> from math import * >>> sin(0) >>> cos(pi) >>> sqrt(9) Atomic Data - Numbers : floats, integers Can use “type” to find out the data type of something. type(5) # int type (5.0) # float - Strings Some examples : “hello” and ‘hello’ type(“hello”) # str “hello” + “world” # plus symbol concatenates two strings