Page 3 of 4

Posted: Thu Jan 29, 2009 8:19 pm
by Project hash brown
Thank you, i wasn't counting the 2 when i went back two places, i jumped straight back to the 3 again

Posted: Tue Mar 10, 2009 7:06 pm
by cyberwoozle
What is a 8411 ???
I don't want any hint or solution, but the challenge name is "Like a 8411" and i have no idea about what a 8411 could be :roll:

Found it .... had to think outside the box :D

Posted: Mon Apr 06, 2009 8:19 am
by cutter
In the "Didactic Scrambled Egg Cipher Pre-Warmup Challenge"-challenge does " for (int eggs = {each 3-byte tuple in plaintext}) " mean that i should consider 000102, 030405 ,060708 or 000102,010203, 020304 ... for the plaintext 00010203040506070809 in hex?

Posted: Mon Apr 06, 2009 9:19 am
by Yharaskrik
It means your first guess, i.e. 000102, 030405, ...

Posted: Wed Apr 15, 2009 10:52 pm
by hitman412
Hello! My name is Hitman :D This is a cool website!!!
Hi Jack

Posted: Wed Apr 15, 2009 10:57 pm
by soulness
hitman412 wrote:Hello! My name is Hitman :D This is a cool website!!!
Hi Jack
Hi Hit) welcome
I think all are glad to see new people, success in tests and competitions.
Enjoy ;)

Posted: Thu Jun 11, 2009 9:27 am
by Moltress
hi guys!im new member! :D :D :D :D

where are the chalenges??????

Posted: Thu Jun 11, 2009 10:38 am
by jeetee
Moltress wrote:where are the chalenges??????
On the homepage, but they're hard to find because on this site it's spelled as challenges :shock:

Also: fail @ your siggy

Anybody Out There?

Posted: Thu Jul 09, 2009 1:18 pm
by horst
I have absolutely no idea what the challenge "Anybody Out There?" is asking for :?:

Posted: Thu Jul 09, 2009 9:49 pm
by gfoot
There should be no doubt about the right answer for Anybody Out There - if you work out what the numbers mean then it will be obvious.

Feeling desperate about the Valuation Challenge

Posted: Tue May 18, 2010 10:20 am
by Masti6
Hi everyone. I've been trying to debug the following *Python26* code for the challenge Valuation for about 2 days now, without succession:

Code: Select all

main = [1,2,3,'x','x',4,5,6]
counter = 0
lenght = len(main)
total = 0
while counter < lenght:
    if main[counter] == "'x'":
        main.remove(counter)
        counter = counter - 2
    else:
        total = total + main[counter]
        counter = counter + 1
if counter == lenght:
    print total
Am I making the right approach with the "'x'", or should I just store x = 0 at the start and take 'these' off the ones on the main list?
Also, on:

Code: Select all

    else:
        total = total + main[counter]
It gives me an error:
TypeError: unsupported operand type(s) for +: 'int' and 'str'
What I do understand of this error is that I cannot add a string to a total sum, but I have no idea for to make it work even with the int() operator/variable. Trying to wrap the line, a part of the line, or even only a word in the line doesn't seem to do the trick. I just can't seem to be able to change a string into int and vice versa.
Should I instead define the int() and str() already in the list to make it work or does someone have a brighter idea?

I just can't seem to understand how I'm able to fail at something as simple as this. Might be that I'm new to the language anyways but...

Thanks in advance!

Posted: Tue May 18, 2010 11:03 am
by Arkondi
I'm using Python 3.1, but I think the way you are using remove is wrong. I suggest you take a look into the documentation for the correct use of remove.

And why do you use an if-statement at the end?

Posted: Tue May 18, 2010 11:52 am
by Masti6
Arkondi wrote:I'm using Python 3.1, but I think the way you are using remove is wrong. I suggest you take a look into the documentation for the correct use of remove.

And why do you use an if-statement at the end?
to print out the total only when the counter is the same as lengTH (omglol typo on teh code) of the original main list - aka when it meets the end of the list.

Posted: Tue May 18, 2010 2:15 pm
by Zeta
Try to understand the following interactive python session.
After that review your code again.

Code: Select all

Python 2.6.2 (r262:71600, Mar 29 2010, 15:30:01) 
[GCC 4.4.1 [gcc-4_4-branch revision 150839]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = [1,2,3,'x','x',4,5,6]
>>> type(a[0])
<type 'int'>
>>> type(a[3])
<type 'str'>
>>> a.remove(4)
>>> a
[1, 2, 3, 'x', 'x', 5, 6]
>>> del a[3]
>>> a
[1, 2, 3, 'x', 5, 6]
>>> len("'x'")
3
>>> "'x'"[2]
"'"
>>> len(a)
6
>>> a.remove(6)
>>> len(a)
5
>>> b = int('6')
>>> b
6
>>> type(b)
<type 'int'>
>>> c = str(b)
>>> c
'6'
>>> type(c)
<type 'str'>
>>> 

Posted: Tue Mar 29, 2011 1:24 pm
by bodjo
well i can't understand what the 'delegates' challenge is asking for:it seems easy but i can't understand it :oops:
may be because english is my 3rd langage
i'll appreciate any help