Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- string = 'hel Lo Myn AmeIsF utIlityh oWARe you?!'
- def mixup(x):
- total = 0
- newAnswer = ''
- cut = string.split()
- mixedCut = cut[1]+cut[4]+cut[0]+cut[6]+cut[3]+cut[5]+cut[2]
- while x < 10:
- for char in 'alabaster':
- total += ord(char)
- x += 1
- #print total ## 1886 (for x == 8)
- #print mixedCut ## L|o|u|t|I|l|i|t|y|h|h |e |l |y |o |u |? |! |A |m |e |I |s |F |o |W |A |R |e |M |y |n
- # 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31
- spice = mixedCut[total/113] # 16
- tangerine = mixedCut[total/(70*4)] # 6
- coldCut = mixedCut[int(total/math.pow(7.29,4))] # 0
- ham = mixedCut[total/157] # 12
- icedCream = mixedCut[total/148] # 12 --- deci total e futut fiindca ai avea 2 caractere la fel si `whoami?` nu are
- alarm = mixedCut[int(total/math.pow(26,2))] # 2
- herpes = mixedCut[total/176] # 10
- answer = (spice,tangerine,coldCut,ham,icedCream,alarm,herpes)
- for char in answer:
- newAnswer += str(char)
- print newAnswer
- for i in range(7, 10): # crapa mai jos de 7
- mixup(i)
- #print 'The above should read \"WhoAmI?\" but it won\'t!'
- #print 'What could I possibly be doing wrong?'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement