python psuedo code for  deadant