use local and globla variable, format print