Final assignment python script code