Lecture Notes on 04 Sep 2009 Learning a new Computer Language * Write Hello World print "Hello World!" * Characterset * Variables * Statement * Operators: Arithmetic: +, -, *, /, %, ** Comparison: ==, !=, >, >=, <, <= Boolean: not, and, or * Conditionals: if (cond): # do this else: # do that * Loops * Functions def main(): print "Hello World" main() * Lists (Arrays) * Simple Input / Output x = input ("Enter a number: ") name = raw_input ("Enter your name: ") Simple implementation of Computer Programs * Input phase - read data either from the console or from a file * Computation phase - perform the necessary calculations with the data * Output phase - write out the data either to the console or to a file