Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Doomkiller

Pages: 1 ... 9 10 11 12 13 14 15 [16] 17 18 19 20 21 22 23 ... 115
301
Off-Topic Discussion / Re: Python Help
« on: September 03, 2011, 08:16:58 AM »
Code: [Select]
//what does def do?//
def getnextrow(oldrow):
    size = len(oldrow)
    newrow = "." * size

    for i in range(0, size):
        char = "."
          //and what happens here?//
        if (oldrow[i - 1] == "*") != (oldrow[(i + 1) % size] == "*"): # modulo size so that the index wraps around
            char = "*"
        newrow[i] = char

    return newrow

firstrow = "..*.**.."
nextrow = getnextrow(firstrow)
print(nextrow)


302
Off-Topic Discussion / Re: Python Help
« on: September 03, 2011, 08:00:26 AM »
Oh, no I know what you mean by the modulo and how the neighbours worked, I meant when I looked at your code, i didn't quite understand what you were doing

303
Off-Topic Discussion / Re: Python Help
« on: September 03, 2011, 07:19:39 AM »
Im not too sure how you did it night, care to elaborate more?

Also, I solved it anyway :P

Code: [Select]
lines = int(raw_input("Number of lines: "))
start = raw_input("Start line: ")
firstline = start
nextline = []
print firstline
for i in range(lines-1):
    for j in range(len(start)):
        if (firstline[j-1] == "*" and firstline[j-len(start)+1] == "."):
            nextline.append("*")
        elif (firstline[j-1] == "." and firstline[j-len(start)+1] == "*"):
            nextline.append("*")
        else:
            nextline.append(".")
    firstline = "".join(nextline)
    print firstline
    nextline = []

304
Off-Topic Discussion / Re: Python Help
« on: September 03, 2011, 04:43:44 AM »
Forbidding the use of certain functions, certain data types, etc...

Our instructor pisses us off that way. >.<

No restrictions as far as I know

btw, I has started a sortve code, that sortve works...
Code: [Select]
lines = int(raw_input("Number of lines: "))
start = raw_input("Start line: ")
firstline = start
nextline = []
print firstline
for i in range(lines-1):
    for j in range(len(start)-1):
        if (firstline[j-1] == "*" and firstline[j+1] == "."):
            nextline.append("*")
        elif (firstline[j-1] == "." and firstline[j+1] == "*"):
            nextline.append("*")
        else:
            nextline.append(".")
    firstline = "".join(nextline)
    print firstline
    nextline = []


It starts off good, going:
Number of lines: 8
Start line: ......*......
......*......
.....*.*....

but then:
Traceback (most recent call last):
  File "C:/Users/User/Documents/testingagain.py", line 10, in <module>
    elif (firstline[j-1] == "." and firstline[j+1] == "*"):
IndexError: string index out of range

:(


305
Off-Topic Discussion / Re: Python Help
« on: September 03, 2011, 03:53:21 AM »
Your best bet is to make a flowchart. This is what I usually do when I'm trying to solve complex but recursive problems.

Also, are there any restrictions to your program?

I have tried that, i know the general idea of how to do it, I just don't know how to get python to do it

Restrictions? by what do you mean?

306
Off-Topic Discussion / Python Help
« on: September 03, 2011, 03:33:32 AM »
Anyone here good with python? (outside of Ra2)
I got this problem with this challenge:


Don't really want the solution, just want some help on to how to go about solving this. Did try the forum on the challenge website, but I have yet to recieve and answer :/

Also, im using python 2.6.5 in idle

307
Off-Topic Discussion / Re: Music ATM
« on: September 02, 2011, 01:52:38 AM »
07-audiotrack 7
(in case people are wondering, its from age of empires sound track)

308
Tournament Archives / Re: Clash Cubes IV - Splash, Brackets & Videos
« on: September 02, 2011, 01:37:59 AM »

309
Existing Games / Re: Thing Thing Series
« on: September 01, 2011, 03:12:32 AM »
AHhh, loved Thing Thing Arena 3. Dual welding shot guns I believe i used to use all the time

310
Existing Games / Re: What are your favorite games now and Why?
« on: August 30, 2011, 06:22:39 AM »
5. Maplestory (i just love it)

Used to waste sooooo much time playing that game xD Shame that the new patches have made it so much easier to level. I liked it when you were strong if you were level 70.
 

Ahh, the good old days, where I could never get past lvl 40 before getting bored of that char and changing XD

Though, I do love my lvl 134 Mechanic. Even though i havnt played it in a while :P

311
Off-Topic Discussion / Re: Music ATM
« on: August 29, 2011, 03:11:41 AM »
What is love? Haddaway

312
Existing Games / Re: What are your favorite games now and Why?
« on: August 29, 2011, 03:03:17 AM »
^will agree with robo on that one^

1. Doom series (will always be that)
2. Amnesia: The Dark Descent (never gets old)
3. Aion (damn you deadtarget :P)
4. WoW (one again, damn you deadtarget)
5. Maplestory (i just love it)
6. Left for Dead 1-2 (Once again, never gets old)
7. Hmmm, whatever i feel like :P (was inclined to say Minecraft or Dwarf Fortress, but can't make my mind up)

313
Existing Games / Re: Games you like( but you thought you won't).
« on: August 28, 2011, 06:02:55 AM »
Bakugan. Didn't think I would like it

Wow. Didn't really think highly of it, so i'd never thought I would like it :P (mind you, I love both Titan quest and Sacred 2)

314
Off-Topic Discussion / Re: General Chatter Thread
« on: August 28, 2011, 04:44:35 AM »
Hmm, so I was thinking about getting back into RA2..
Then XxDeadtarget told me to go get Aion.

There goes that idea out the window :P

lol I had the same thought.. until I brought a PS3 :P

Hahahaha XD
I should get a ps3 as well :P
BUT, in the mean time, Xxdeadtarget has me playing both WoW and Aion, so yeah :P

315
Off-Topic Discussion / Re: General Chatter Thread
« on: August 28, 2011, 04:34:49 AM »
I now tell you to go get Deus Ex.

I so actually wanna get that

316
Off-Topic Discussion / Re: General Chatter Thread
« on: August 28, 2011, 04:04:00 AM »
Hmm, so I was thinking about getting back into RA2..
Then XxDeadtarget told me to go get Aion.

There goes that idea out the window :P

317
Chatterbox / Re: What does your voice sound like?
« on: August 28, 2011, 04:02:06 AM »
I like you and your friend's accents.

Haha thanks XD
Can you guess which voice is mine?

318
Stock Showcases / Re: Badnik96 Stock Showcase
« on: August 27, 2011, 07:31:15 AM »
and now I am digging up old fossils from le BoTM files apparently
*pic*
Was gonna be for Stocks Revenge, but then they added the goddamn REALISTIC RULE. So I entered it in BoTM. Still dunno how GK guessed it was me WHEN I

Haha sorry about that XD

Hint: It may come back Stocks Revenge though
dsl style :D

319
Off-Topic Discussion / Re: General Chatter Thread
« on: August 27, 2011, 07:25:30 AM »
Yeah im pretty sure its them :D

320
Off-Topic Discussion / Re: General Chatter Thread
« on: August 27, 2011, 07:10:58 AM »
Ohhh theres octus in that picture :D

Pages: 1 ... 9 10 11 12 13 14 15 [16] 17 18 19 20 21 22 23 ... 115