Advertisement
Guest User

Untitled

a guest
Mar 28th, 2015
773
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. def Unowntest():
  2. PID = raw_input('PID = 0x')
  3. PIDb = str(bin(int(PID,16)))
  4. PIDb = PIDb[2:]
  5. while len(PIDb) < 32:
  6. PIDb = '0' + PIDb
  7. byt = str(PIDb[6:8]) + str(PIDb[14:16]) + str(PIDb[22:24]) + str(PIDb[30:32])
  8. bytint = int(byt,2)%28
  9. natures = ['hardy ', 'lonely ', 'brave ', 'adamant', 'naughty', 'bold ', 'docile ', 'relaxed', 'impish ', 'lax ', 'timid ', 'hasty ', 'serious', 'jolly ', 'naive ', 'modest ', 'mild ', 'quiet ', 'bashful', 'rash ', 'calm ', 'gentle ', 'sassy ', 'careful', 'quirky ']
  10. nature = natures[(int(PID,16)%25)]
  11. charlist = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','?','!']
  12. print 'unown will be a ' + charlist[bytint] + ' ' + nature
  13.  
  14. if __name__ == "__main__":
  15. run = True
  16. while (run):
  17. Unowntest()
  18. again = raw_input('again? Y/n')
  19. if again.lower() in 'no':
  20. run = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement