# Lecture 1 - What is computation ? Computers does 2 things only: - Calculate - Remember Calculations Computational problem solving & Computational complexities From Ambigous problem statement to computational formulation of a method Declarative vs Imperative Knowledge Declarative: Like an axiom - Statement of Facts Imperative: Like an algorithm - Sequence & Flow control - Computations John Von Newmann & Alan Turing Fixed program computer(Arithmetic logic Unit) - 1941 - Atanasoff & Berry Manchester Mark 1 - University of Manchester Stored program computer Interpreter for instrutions - Now computers can program themselves Flow control, Flowcharts Programming Langs Church-Turing Thesis - Defines the concept of Computability - The Nature of Computation Lambda calculus - Computable and effectivelly calculable if solvable by algo solvable by turing machine and vice versa Universality of Computation Halting problem - if you can prove a program will run forever or not ? no said Turing Low lvl vs High lvl Interpreted vs Compiled Syntax, Static sementics (syntatical validity), Sementics(meaning) Turing: We can compute anything using 6 primitives Read, Write, Move Left, Move Right, Scan, Do nothing Using Tape he showed can compute anything modern langs evolved from primitives primitives -> expressions -> values -> meaning Primitve constructs: - English: Words - Prog langs: Numbers, Strings, Simple operators Static Sementics (Invalidity): - English: I are hungry - Prog langs: 3+"hi" Sementics - English: more than one meaning - Prog langs: only one meaning Everything in Python is an object: - Scalar(int,float,bool(true/false),None) - non-scalar(type()) = x % y = Remainder when x/y x ** y = x to power of y # Lecture 2 - Branching and Iteration