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:
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
#2 - My first approach in python
#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'))
You are viewing our Forum Archives. To view or take place in current topics click here.