Conclusion,and Final Exam Review
Conclusion, and Final Exam Review
What Is this course about? A course about managing complexity o Mastering functional abstraction and data abstraction o Learning trade-offs of various programming paradigms An introduction to programming o Learning how to write programs in Python,Scheme,and SQL 0( Combining multiple programming techniques in large projects o l Understanding how computers interpret programming languages A challenging course that demanded a lot of you
What Is this course about? ● A course about managing complexity ○ Mastering functional abstraction and data abstraction ○ Learning trade-offs of various programming paradigms ● An introduction to programming ○ Learning how to write programs in Python, Scheme, and SQL ○ Combining multiple programming techniques in large projects ○ Understanding how computers interpret programming languages ● A challenging course that demanded a lot of you
"Building Blocks"of Programs f4:a_plus bc [parent=Global] a 4 Primitive Expressions: 2 "he1lo!" add numbers strings names c81 bc 243 Arithmetic Expressions: 1+2 15/3 Return 247 value add(3,4) Call Expressions: max(add(2,3),5*min(-1,4)) Use a4 (6.4) Dont use a4 (2,4 (6,3) Don't use a 4 (2.31 i,total =0,0 Use a 3 Don't use a 3 while i<3: -13ua2 (2,21 Don't use a2 1=1+1 0.2) (2,1 total total i 1,1 (2. 426
“Building Blocks” of Programs
Managing Complexity nx ny nx ny dx dy dx dy nx ny nx*dy ny*dx dx dy dx dy "There are two ways of constructing a software design:One way is to make it so simple that there are obviously no deficiencies,and the other way is to make it so complicated that there are no obvious deficiencies." -C.A.R.Hoare
Managing Complexity
Representing Collections of Data 3 i=0 for elem in [8,9,10]: print(i,":"elem) 2 i+=1 sum(iterablef,start])->value e Return the sum of an iterable of numbers (NOT strings)plus the value of parameter 'start'(which defaults to 0).When the iterable is empty,return start. Note:cannot be called on strings instead must use built in string method join max(iterable[,key-func])->value OR max(a,b,c,...[,key-func])->value e With a single iterable argument.return its largest item. with two or more arguments,return the largest argument
Representing Collections of Data