You are not logged in.

#1 2005-05-06 20:55:49

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

python challenge

http://www.pythonchallenge.com

wowzers... I can do the first one, that's it

please don't post spoilers.... this is fun!

Offline

#2 2005-05-06 21:07:58

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: python challenge

yes, 0 and 1 done!

Offline

#3 2005-05-06 21:17:25

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: python challenge

0 is easy.
and if i got the right idea 1, too.
yepp it was, but hell I should read before typing wink.

Offline

#4 2005-05-06 21:23:30

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: python challenge

cmp wrote:

0 is easy.
and if i got the right idea 1, too.
yepp it was, but hell I should read before typing wink.

right... 1 was funny, because the hint was true - I think everyone does that the same way at first...

I dunno what to do with 2 really...

Offline

#5 2005-05-06 21:36:03

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: python challenge

two is really easy, but I should learn the builtin functions and not recreate everything by hand. (that's exactly the problem, if you learn python not in the first place, because then you are too lazy to read it all up).
lol and you have to love the hints (with 3 I was searching in the manual and bam there was the hint).

Offline

#6 2005-05-06 21:46:02

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: python challenge

I don't think I did 3 right... which part is for the URL? the lowercase or bodyguards?

I'm actually using this to learn python better... (I work good like this)...

Offline

#7 2005-05-06 21:53:07

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: python challenge

I dunno, because there are so many small letters, which the condition is true for.
ok, I solve three, but the author is really a bitch wink

Offline

#8 2005-05-06 21:57:34

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: python challenge

ack, I did something wrong and got one value initially... ummm do top and bottom count? as in

   A
   A
   A
AAAaAAA
   A
   A
   A

Offline

#9 2005-05-06 21:59:24

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: python challenge

no think about the exaclty. I guess you did the same mistake as me.
btw. I'm now using php to solve the puzzle, it really hate the language, but at least I do know the standard library.

Offline

#10 2005-05-06 22:03:02

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: python challenge

damn you phrakture..!!!
*shakes fist*

lol..
I am on 3...and doing it all in ruby! rofl


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#11 2005-05-06 22:18:20

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: python challenge

wow, I can't do 3... I just made the longest reg expr ever, and I thought it was right, but it wasn't...

peanut gallery?

edit: DOH... I need to learn to read the giant bold print....

Offline

#12 2005-05-06 22:26:23

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: python challenge

w00t. got 3..now onto 4.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#13 2005-05-06 22:31:18

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: python challenge

ahahahah, I started laughing when I saw 4... it was very obscure... until I realised the link

ok, four was simple... 5 I don't get... can anyone clue me in as to the "format" (I won't give too much away)

OMG wait I got it *slaps forehead*

edit:
ok, maybe not... I know what to do, but not how to interpret the results... and I need to leave work...

"peak hell" is for later

Offline

#14 2005-05-06 23:48:37

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: python challenge

EDIT: Good god. the guy who created this is evil!


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#15 2005-05-07 00:51:39

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: python challenge

well, I got stuck on #7. Time to eat..


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#16 2005-05-07 03:04:56

Vinny
Member
From: the fifth floor
Registered: 2005-04-25
Posts: 29

Re: python challenge

Is there something python-specific about number 5?
I got the first 4 using sed,grep,tr,sort, and a loopy bash script,
but  I don't know what to do with "peak hell"  :?:

Offline

#17 2005-05-07 03:38:03

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: python challenge

yeah. so far #5 is the only one I have actually had to do in python. The rest i have done in ruby...
I still don't know what to with #7 though...


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#18 2005-05-07 07:54:05

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: python challenge

Vinny wrote:

but  I don't know what to do with "peak hell"  :?:

pronounce it - it's also something perl and python have in common

Offline

#19 2005-05-07 11:15:57

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: python challenge

what a wonderful looking theme on their phpbb forum,
we should have the same here to get away from the boring current one,


arch + gentoo + initng + python = enlisy

Offline

#20 2005-05-08 13:30:46

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: python challenge

feel kinda of dumb stuck on 2  :cry:  got the characters but what to do with them  wink

EDIT forget it I got it  lol


Mr Green

Offline

#21 2005-05-10 22:47:29

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: python challenge

oh...good...god... so 7 took me a while (you need a non-standard module... ugh) and I think 8 is worse.... *cry*

Offline

#22 2005-05-10 22:56:03

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: python challenge

heh. I stopped at 7. It was fun, but I felt I spent enough time on it.

And if you need a non-standard module, then I don't feel bad stopping there. wink


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#23 2005-05-10 23:02:14

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: python challenge

cactus wrote:

heh. I stopped at 7. It was fun, but I felt I spent enough time on it.

And if you need a non-standard module, then I don't feel bad stopping there. wink

well it's PIL (Python Image Library) - it's *the* image module to use... its just that I had to download the thing (@work) - it took me a bit to realise that...I guess you could always find out a PNG header's length and just open the raw file data...

Offline

Board footer

Powered by FluxBB