Introduction to Computer Science - Python CSc 2010 Spring 2011 Marco Valero
Overview What is Computer Science Programming Languages Python
“Computer science is no more about computers than astronomy is about telescopes” – Edsger W. Dijkstra
Computer Science Study of information and computation ▫What does it mean to be computable How can we describe computation ▫Algorithms How can we describe algorithms ▫Languages
Algorithms Finite set of unambiguous instructions performed in a sequence to achieve a goal makeCoffee: ▫Place filter in coffee machine ▫Scoop 4 teaspoons of coffee into filter ▫Take coffee pot and fill with 4 cups water ▫Fill coffee machine with water from pot ▫Place pot under percolator ▫Turn on
makeCoffee pt 2 makeCoffee(n): ▫Place filter in coffee machine ▫Scoop n teaspoons of coffee into filter ▫Take coffee pot and fill with n cups water ▫Fill coffee machine with water from pot ▫Place pot under percolator ▫Turn on
More examples washHair: ▫Wet hair ▫Take shampoo and squirt into hand ▫Lather hair with shampoo ▫Rinse hair ▫repeat
Programming Languages Machine and assembly Level Higher level ▫Imperative, object oriented ▫Declarative, functional Implementation ▫Compiled ▫Interpreted ▫Hybrid
Python High level, object oriented, imperative language Hybrid implementation, CPython Similar functionality / Code organized into modules ▫Myro module