Re: [Tutor] Python Challenge Online - 30 Questions

2018-03-01 Thread Tim Golden
On 01/03/2018 14:36, Julien Carlier wrote: Hi Tim, I didn't send this message to several groups. I sended this message to 20 people from the same group. I will take care to choose relevant groups. What is considered good form? Regards, Julien Replied off-list TJG ___

Re: [Tutor] Python Challenge Online - 30 Questions

2018-03-01 Thread Tim Golden
On 01/03/2018 13:36, Julien Carlier wrote: Cisco & Dimension Data organize a Python Challenge on EDITx. It is a good way to test your skills & have fun. [... snip ...] You've just cross-posted this to several Python mailing lists / newsgroups, some of them certainly irrelevant. This is not co

[Tutor] Python Challenge Online - 30 Questions

2018-03-01 Thread Julien Carlier
Hello, Cisco & Dimension Data organize a Python Challenge on EDITx. It is a good way to test your skills & have fun. -> https://editx.eu/it-challenge/python-challenge-2018-cisco-and-dimension-data Rules are simple: 15 minutes online, 30 questions & 3 jokers. Everyone is allowed to participate b

Re: [Tutor] Python challenge and decryption

2011-12-23 Thread col speed
> That's exactly the point. > Very few people know about maketrans before they take the Python Challenge. > > But that's the whole point of the challenge, as you go through it you will > discover new and powerful tools in the Python library that save you from > having to invent your own. (Look out

Re: [Tutor] Python challenge and decryption

2011-12-23 Thread Alan Gauld
On 23/12/11 16:58, Joaquim Santos wrote: Thanks for all the tips so far. The maketrans like suggested probably would be faster but I didn't knew about it That's exactly the point. Very few people know about maketrans before they take the Python Challenge. But that's the whole point of the cha

Re: [Tutor] Python challenge and decryption

2011-12-23 Thread Prasad, Ramit
Posting as HTML caused your indentation to be all wrong. Try to post as plain text to remove those errors. Thankfully your program is not very complicated. import string def decrypt(cypheredText, shiftedCypherNumber): ''' This function will take two arguments. The first is the cyphered text,

Re: [Tutor] Python challenge and decryption

2011-12-23 Thread Joaquim Santos
Hi again list! I've been trying to implement the feedback I got. So far, I removed the print statements from the function, limited the range (just for the z at the moment) and tried to get all printing in one or two lines... but without success... I don't know if I'm doing the join as it should...

Re: [Tutor] Python challenge and decryption

2011-12-21 Thread Dave Angel
On 12/21/2011 06:39 AM, Joaquim Santos wrote: Hi List! Thanks for all the input you guys gave me! I'm trying to implement your ideas on the function and I've been getting some parts right (the correct translation, still vertical and without spaces) or the wrong translation but with spaces... My

Re: [Tutor] Python challenge and decryption

2011-12-21 Thread Joaquim Santos
Hi List! Thanks for all the input you guys gave me! I'm trying to implement your ideas on the function and I've been getting some parts right (the correct translation, still vertical and without spaces) or the wrong translation but with spaces... My problem is my range check. I'm also getting a f

Re: [Tutor] Python challenge and decryption

2011-12-19 Thread col speed
On 20 December 2011 03:00, Joaquim Santos wrote: > Hi list! > > This is my first post here but I've been following the list for some time > now! I know that recently there was a message about decryption and all. I > think that was what made me go back into the Python challenge and try to > solve s

Re: [Tutor] Python challenge and decryption

2011-12-19 Thread Steven D'Aprano
Joaquim Santos wrote: - How can I make this "Human readable"? ... Print the letters in just one (or more) lines and maybe replace the " for spaces (This one I suppose it could/should be done with whitespaces() or just making a loop to check and change those for ' '.) Firstly, you should not

Re: [Tutor] Python challenge and decryption

2011-12-19 Thread Prasad, Ramit
Hi list!  My Python version is 2.7.1 and my OS is Linux Mint 11. My code is this one: def decrypt(cypheredText, shiftedCypherNumber): ''' This function will take two arguments. The first is the cyphered text, the second is the number of characters we need to shift the text so we can decrypt it.

[Tutor] Python challenge and decryption

2011-12-19 Thread Joaquim Santos
Hi list! This is my first post here but I've been following the list for some time now! I know that recently there was a message about decryption and all. I think that was what made me go back into the Python challenge and try to solve some of them... For the second one, I first laid on paper my

Re: [Tutor] Python Challenge 2

2007-12-21 Thread Tiger12506
>I did this and got this string :- > > "i hope you didnt translate it by hand. thats what computers are for. > doing it in by hand is inefficient and that's why this text is so long. > using string.maketrans() is recommended. now apply on the url" > Is that the answer because it does not solve th

Re: [Tutor] Python Challenge 2

2007-12-21 Thread Alan Gauld
"David Holland" <[EMAIL PROTECTED]> wrote > > "i hope you didnt translate it by hand. thats what computers are > for. > doing it in by hand is inefficient and that's why this text is so > long. > using string.maketrans() is recommended. now apply on the url" > > Is that the answer because it doe

[Tutor] Python Challenge 2

2007-12-21 Thread David Holland
I did this and got this string :- "i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url" Is that the answer because it does not solve the problem

[Tutor] Python Challenge

2007-08-05 Thread bhaaluu
Greetings: Here's a fun site, though probably geared more for intermediate Python programmers, than for beginners: http://www.pythonchallenge.com/ It's 33 levels of riddles that can be solved with Python in some way or another. =) So you have the site up in your browser, and your Python interpre

Re: [Tutor] python challenge 2

2006-07-18 Thread Bob Gailer
devayani barve wrote: > this is what i did for level 2 of python challenge: Please don't publish challenge solutions. That defeats the purpose of the challenge. That said your program takes a very circuitous route to iterate thru a string. Why not just: dict = ... s = ... for c in s: print

Re: [Tutor] python challenge 2

2006-07-18 Thread Kent Johnson
devayani barve wrote: > this is what i did for level 2 of python challenge: Please don't post verbatim solutions to the challenges, let's leave some challenge in it for those who come after. Kent ___ Tutor maillist - Tutor@python.org http://mail.pyth

Re: [Tutor] python challenge 2

2006-07-17 Thread Luke Paireepinart
devayani barve wrote: > this is what i did for level 2 of python challenge: > > > dict={'a':'c','b':'d','c':'e','d':'f','e':'g','f':'h','g':'i','h':'j','i':'k','j':'l','k':'m','l':'n','m':'o','n':'p','o':'q','p':'r','q':'s','r':'t','s':'u','t':'v','u':'w','v':'x','w':'y','x':'z','y':'a','z':'b','

[Tutor] python challenge 2

2006-07-17 Thread devayani barve
this is what i did for level 2 of python challenge:   dict={'a':'c','b':'d','c':'e','d':'f','e':'g','f':'h','g':'i','h':'j','i':'k','j':'l','k':'m','l':'n','m':'o','n':'p','o':'q','p':'r','q':'s','r':'t','s':'u','t':'v','u':'w','v':'x','w':'y','x':'z','y':'a','z':'b','.':'.',"'":"'","(":"(",")":")

Re: [Tutor] Python challenge

2006-05-15 Thread Sean Perry
David Holland wrote: > I looked at this and got stuck on the first one :- Thanks for this. I missed it the first time it showed up on this list. Kinda fun and reminds me why I love python. Four lines in the interactive interpreter and most of the challenges are solved. __

Re: [Tutor] Python challenge

2006-05-06 Thread David Holland
Jason, Thanks that helped me work it out. David  Jason Massey <[EMAIL PROTECTED]> wrote: David,What answer did you get?  One of the things to rember on the challenge is to take your answer and put ".html" (no qutoes) on the end of it in the url.So for the first problem the url would be: http://ww

Re: [Tutor] Python challenge

2006-05-04 Thread Jason Massey
David,What answer did you get?  One of the things to rember on the challenge is to take your answer and put ".html" (no qutoes) on the end of it in the url.So for the first problem the url would be: http://www.pythonchallenge.com/pc/def/.htmlOn 5/4/06, David Holland < [EMAIL PROTECTED]> wrote: I lo

[Tutor] Python challenge

2006-05-04 Thread David Holland
I looked at this and got stuck on the first one :- http://www.pythonchallenge.com/pc/def/0.html It says try changing the url. I assumed that it either meant 2*38 or 2 to the power of 38 but I can't see how to put either of those in the url.What have I missed ?Thanks in advance.David

Re: [Tutor] Python Challenge Level 6

2005-05-11 Thread Roel Schroeven
Kent Johnson wrote: > I'm stuck on 6 too. I found the comments but I can't make any sense of them. > Any hints? I'm sorry, I can't make it any clearer without giving it away. Maybe you can try to search the forum (http://www.pythonchallenge.com/forums) for more clues. > > Kent > > Roel Schro

Re: [Tutor] Python Challenge Level 6

2005-05-11 Thread Kent Johnson
I'm stuck on 6 too. I found the comments but I can't make any sense of them. Any hints? Kent Roel Schroeven wrote: > Orri Ganel wrote: > > >>Hello all, >> >>First and foremost, for those who don't know, www.pythonchallenge.com >>is a set of python-related riddles. Now, for those who are past l

Re: [Tutor] Python Challenge Level 6

2005-05-11 Thread Roel Schroeven
Orri Ganel wrote: > Hello all, > > First and foremost, for those who don't know, www.pythonchallenge.com > is a set of python-related riddles. Now, for those who are past level > six, any sort of hint would be appreciated. Right now, all I know is > what module to use (i think) and that I have t

[Tutor] Python Challenge Level 6

2005-05-10 Thread Orri Ganel
Hello all, First and foremost, for those who don't know, www.pythonchallenge.com is a set of python-related riddles. Now, for those who are past level six, any sort of hint would be appreciated. Right now, all I know is what module to use (i think) and that I have to somehow use it on channel.jpg

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread John Carmona
To all thanks I have got it now!!! JC ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Roel Schroeven
John Carmona wrote: > This is what I did. I have tried the whole field, part of the URL (after the > .com), etc.. I Just get the old 404 not found message. You just need to apply it to the basename of the filename. -- If I have been able to see further, it was only because I stood on the shoul

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Alan Gauld
> ???trans function. But now "apply it to the URL", I am lost again. Its not strictly accurate, it means apply it to a section of the address... Alan G. (I'm catching up! All the previous posts help of course :-) ___ Tutor maillist - Tutor@python.or

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread John Carmona
copied the URL, paste it in my script in Python and run it (once) did not get nowhere, then did it a second time, and again did not get nowhere. JC ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread John Carmona
This is what I did. I have tried the whole field, part of the URL (after the .com), etc.. I Just get the old 404 not found message. JC ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Roel Schroeven
Alan Gauld wrote: >>This matches '[A-Z]{3}[a-z]{1}[A-Z]{3}' 477 occurences... > > > Doesn't the {3} mean a minimum of 3? It's exactlu equivalent to [A-Z][A-Z][A-Z] > I may be wrong, its not a feature I use much but I thought there was a > gotcha with the {} notation that meant you had to provi

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Bob Gailer
At 10:52 AM 5/10/2005, John Carmona wrote: Hey Liam thanks again for the hint. I have finally managed to use the ???trans function. But now "apply it to the URL", I am lost again. (I did apply it to the URL-twice) but nope, nothing is happening. One more hint if possible. How did you apply the

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread John Carmona
Hey Liam thanks again for the hint. I have finally managed to use the ???trans function. But now "apply it to the URL", I am lost again. (I did apply it to the URL-twice) but nope, nothing is happening. One more hint if possible. Thanks JC ___ Tutor

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Alan Gauld
> This matches '[A-Z]{3}[a-z]{1}[A-Z]{3}' 477 occurences... Doesn't the {3} mean a minimum of 3? I may be wrong, its not a feature I use much but I thought there was a gotcha with the {} notation that meant you had to provide a terminating character too? Alan G. (Who has only just started on the

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Liam Clarke
Hi, So... the [^A-Z] limits the [A-Z]{3}?... /me picks at IDLE. Dang, it does. Thanks a bundle, Roel! And I learn a little more about regexes :Z Cheers, Liam Clarke On 5/10/05, Roel Schroeven <[EMAIL PROTECTED]> wrote: Liam Clarke wrote:> This matches '[A-Z]{3}[a-z]{1}[A-Z]{3}'  477 occ

Re: [Tutor] Python Challenge - Riddle 2

2005-05-10 Thread Roel Schroeven
Liam Clarke wrote: > This matches '[A-Z]{3}[a-z]{1}[A-Z]{3}' 477 occurences... so I hope > that it's all the same letter. You have to many occurences because that regex matches XXXxXXX, but also XXxXX. You should only match exactly 3 guards on each side. IIRC I used something like (sa

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread Chris Smith
> Am I looking for something like this - > > XXXjXXX? or something like XjXX or XXjX? The former: 3 on each side. Exactly 3. BTW , you can check your understanding by saving the image you get from riddle 6, compressing it with zlib, filtering out all but string.letters and looking for the same

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread Liam Clarke
Hi all, > Hint: the hint on the screen says "exactly three."   -Arcege Hah, yeah, but it also says 'all sides' and that had me following a dead-end for awhile, and something in the challenge hint forums made me think it might be exactly three in total, but surrounding the lowercase letter. i.e

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread R. Alan Monroe
> Am I looking for something like this - > XXXjXXX? or something like XjXX or XXjX? I've also looked for - Take the challenge's hint a little more literally, it's quite specific. This one had me stumped for a little while until I realized my mistake. Alan

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread Liam Clarke
Hmmm... the forums don't overly explain level 3. Am I looking for something like this - XXXjXXX? or something like XjXX or XXjX? I've also looked for - ooXXXoo XXXjXXXooXXXoo and oooXooo oooXooo oooXooo XXXjXXX oooXooo oooXooo oooXooo Argh. My head is going to explode. On 5/10/05, Roel S

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread Liam Clarke
Yeah, I was going that way, got a half translation, saw the word 'trans' in the text, went from there. On 5/10/05, R. Alan Monroe <[EMAIL PROTECTED]> wrote: > Hi John, took me awhile to solve this one too, it's quite good, teaches you> about a part of Python that you wouldn't normally use.> Do you

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread R. Alan Monroe
> Hi John, took me awhile to solve this one too, it's quite good, teaches you > about a part of Python that you wouldn't normally use. > Do you want hints or spoilers? > I've give hints for now, search the Python docus for 'trans', check the > string methods. You can also do it with a convolut

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread Roel Schroeven
John Carmona wrote: > OK I am stuck on this one. I see what I need to do (correct me if I am > wrong). But I need to write a script that will replace each letter by > another one (In this case a --> c etc.). I look at String, List and > Dictionary. I thought I could use the text.replace option

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread John Carmona
Thanks Liam, I will start checking this afternoon. Regards JC ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python Challenge - Riddle 2

2005-05-09 Thread Liam Clarke
Hi John, took me awhile to solve this one too, it's quite good, teaches you about a part of Python that you wouldn't normally use. Do you want hints or spoilers? I've give hints for now, search the Python docus for 'trans', check the string methods. Hope that didn't make it too obvious. Now, if

[Tutor] Python Challenge - Riddle 2

2005-05-09 Thread John Carmona
OK I am stuck on this one. I see what I need to do (correct me if I am wrong). But I need to write a script that will replace each letter by another one (In this case a --> c etc.). I look at String, List and Dictionary. I thought I could use the text.replace option but I am not sure. Anybody t