You are viewing our Forum Archives. To view or take place in current topics click here.
Python Examples for the last wizard contest
Posted:

Python Examples for the last wizard contestPosted:

hippie
  • Gold Member
Status: Offline
Joined: Dec 31, 200815Year Member
Posts: 1,049
Reputation Power: 1918
Motto: kids think hippie's 7 foot tall, eats glass and shits lightning -"Dimebag"
Motto: kids think hippie's 7 foot tall, eats glass and shits lightning -"Dimebag"
Status: Offline
Joined: Dec 31, 200815Year Member
Posts: 1,049
Reputation Power: 1918
Motto: kids think hippie's 7 foot tall, eats glass and shits lightning -"Dimebag"
Posting so Kyle can go full potato over the solutions from this contest.

#1 - Root's Idea

import binascii;hippie = input("yolo datum: ").split();COUNT = 31;
def increment ():
    global COUNT;COUNT+=1;return COUNT;
def zzz(data):
    vv = (ord(data) - increment())
    if vv > 0: return chr(vv);
    else: return chr(256 + vv)
for smells in hippie: print(zzz(binascii.unhexlify(smells)))


#2 - My first approach in python

COUNT = 49
def increment():
    global COUNT;COUNT+=1;return COUNT
def zzz(data):
    vv = (ord(data) - increment())
    if vv > 0: return chr(vv)
    else: return chr(256 + vv)
with open("logo.wiz", "rb") as input:
    with open("end", "wb") as output:
        while True:
            data = input.read(1)
            if len(data) == 0: break
            output.write(bytes( str( zzz(data) ), 'ascii'))

The following 7 users thanked hippie for this useful post:

Churro- (03-09-2014), Bullets (02-14-2014), nebo (01-20-2014), Scizor (01-11-2014), BigRedMachine (01-06-2014), Kyle93 (01-06-2014), Katsumi (01-06-2014)
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.