added pi psuedo code

added pi psuedo code
added python example.