whole example 1 with plotting the function
Added raw_input for files
added some print lines for debugging