Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def Unowntest():
- PID = raw_input('PID = 0x')
- PIDb = str(bin(int(PID,16)))
- PIDb = PIDb[2:]
- while len(PIDb) < 32:
- PIDb = '0' + PIDb
- byt = str(PIDb[6:8]) + str(PIDb[14:16]) + str(PIDb[22:24]) + str(PIDb[30:32])
- bytint = int(byt,2)%28
- 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 ']
- nature = natures[(int(PID,16)%25)]
- 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','?','!']
- print 'unown will be a ' + charlist[bytint] + ' ' + nature
- if __name__ == "__main__":
- run = True
- while (run):
- Unowntest()
- again = raw_input('again? Y/n')
- if again.lower() in 'no':
- run = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement