FAQ  •  Login

Level 2

Moderators: UncleTimmy, mjpieters

Enjoying the challenge? Need a hint?
Make a donation and help keep the site running! -thesamet
<<

thato

Posts: 3

Joined: Thu May 17, 2007 5:44 am

Post Thu May 17, 2007 5:52 am

get started

how do i get started
<<

mady

Posts: 3

Joined: Tue Aug 16, 2005 11:06 am

Post Sun Oct 07, 2007 10:59 am

am still unable to get the result ..... give me the answer
<<

mady

Posts: 3

Joined: Tue Aug 16, 2005 11:06 am

Post Sun Oct 07, 2007 11:05 am

am still unable to get the result ..... give me the answer
<<

Acapulco

Posts: 2

Joined: Mon Feb 04, 2008 7:25 pm

Post Mon Feb 04, 2008 7:28 pm

Hello. I'm completely new to Python (though not to programming) and I'm getting an EOL error after entering the big mess using input just after "<--" even though im doing string.replace("\n","") after reading the input but before my "solving" algorithm...

Can't seem to find the reason. Can anyone point me out in the right direction? Also, when trying to use a file, if I use open(filename.yyy), where should I put filename.yyy? I can't find the "root" directory where the python binary resides.

***EDIT***
The program logic is easy and I have it working already, I just want to know how to be able to cut & paste strings WITH newline character withouth crashing my program.
<<

martix

Posts: 4

Joined: Mon May 12, 2008 11:24 am

Post Mon May 12, 2008 11:27 am

Muhahaha
You don't even need python(or for that matter any language) to solve this.
Just notepad. Although with 6K plus operations at once it does tend to freeze up sort of... so, an advanced editor is preferred.

I hope I don't specifically need python on the latter ones. I used C for the first level. :)
<<

binary-snake

Posts: 3

Joined: Wed Jan 07, 2009 3:42 pm

Location: Algeria

Post Thu Jan 08, 2009 4:43 am

This is a very simple puzzle, I used python to get chars from the mess and i found the solution, it's very easy.
<<

piro

Posts: 1

Joined: Mon Apr 27, 2009 3:46 am

Location: india

Post Mon Apr 27, 2009 4:45 am

well well well

might look a bit lame but here goes ma code


file = open('crypt.txt', 'r')
outf = open('output.txt', 'w')

while 1:
char = file.read(1)
if char == '#' or char == '&' or char == '@' or char == '$' or char == '!' or char == '*' or char == '^' or char == '{' or char == '}' or char == '_' or char == '(' or char == ')' or char == '*' or char == '+' or char == '[' or char == ']' or char == '%' :
char = '_'
outf.write(char)
if not char: break
# print char

file.close()
outf.close()

import sys
sys.exit()
<<

RainCT

Posts: 2

Joined: Mon May 18, 2009 3:29 pm

Post Mon May 18, 2009 3:45 pm

Or you can do the following which does the same:

a = """<paste all the text here>"""
''.join([x for x in a if x.isalpha()])
<<

Lostdiadem

Posts: 1

Joined: Mon Jul 20, 2009 7:28 am

Post Mon Jul 20, 2009 7:32 am

I've tried to enlarge the book but it became blurry. Where do you begin?
<<

mihai722

Posts: 2

Joined: Wed Sep 02, 2009 12:38 am

Location: on the chair

Post Wed Sep 02, 2009 12:40 am

Lostdiadem wrote:I've tried to enlarge the book but it became blurry. Where do you begin?


You must look in the page source :)
<<

karlzt

Posts: 3

Joined: Sun Aug 30, 2009 9:35 am

Location: orbiting Titan

Post Sat Sep 05, 2009 2:02 pm

RainCT wrote:Or you can do the following which does the same:

a = """<paste all the text here>"""
''.join([x for x in a if x.isalpha()])


spoiler! :!: :o
<<

kmote

Posts: 1

Joined: Tue Oct 27, 2009 11:10 am

Post Tue Oct 27, 2009 11:12 am

the hint i needed:

don't forget that python dictionaries don't preserve order.
<<

sheerfox

Posts: 3

Joined: Tue Oct 27, 2009 10:25 pm

Post Tue Oct 27, 2009 10:27 pm

Once you have the 'mess' of characters, what python command/module do you employ to get the answer?
<<

saf

Posts: 1

Joined: Wed Oct 28, 2009 7:43 am

Post Wed Oct 28, 2009 8:01 am

be carfull pasting to ipython

Pasting into IPytong messes up the data.
So the way to paste it properly with Ipython is as follows:
Enter IPython
within IPython enter editor (default editor - could be vi) by writing "edit"

then

text='''<paste with right
click>'''

and then work it out.
<<

Xionicwaste

Posts: 2

Joined: Wed Oct 28, 2009 9:48 am

Post Wed Oct 28, 2009 9:54 am

Hello,

I understand what I am supposed to do its just when ever I implement the source code into python, the code pops up teal color instead of green. The only way to change this to green is to go to the end of the line and delete the non-existent space. This will join the code back with the other code and then turn green, its a problem with the word-rap.

Is there an easy way to bring the code in and only have python do the word-rap not keep the word-rap from the source?

Thanks!
PreviousNext

Return to Python Challenge Hints

Who is online

Users browsing this forum: Google [Bot] and 7 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.