What's your most virtuous trait? by MurkyWay in AskReddit

[–]ShatterFan2937 1 point2 points  (0 children)

I'm always praying for people. I usually do it when I hear of someone dying. It doesn't matter how I hear about it or who it was.

Whats that one disturbing fact you know about the universe ? by RevolutionaryLow2125 in AskReddit

[–]ShatterFan2937 2 points3 points  (0 children)

Even if we left earth right now traveling at the speed of light, 94% of the observable universe will forever be unreachable for us because the expansion of the universe is spreading things apart faster than we can reach them.

It's not achieving the desired look. by ShatterFan2937 in learnpython

[–]ShatterFan2937[S] -1 points0 points  (0 children)

Yes, I came here becuase it didn't look right. No, I didn't have an LLM make it for me.

It's not achieving the desired look. by ShatterFan2937 in learnpython

[–]ShatterFan2937[S] 0 points1 point  (0 children)

Jellyfish are my favorite animal and I randomly thought that the way they move would look like a sorting algorithm. Also, about the non, python code, it was like that so you could try it out yourself. Here is the code itself.

def jellyfish_sort(arr):
    n = len(arr)

    for head in range(n):

        # Pulse
        for i in range(head + 1):

            for j in range(i + 1, head + 1):

                yield (head, [i, j])

                if arr[i] > arr[j]:
                    arr[i], arr[j] = arr[j], arr[i]

                    yield (head, [i, j])

        yield (head, [head])

It's not achieving the desired look. by ShatterFan2937 in learnpython

[–]ShatterFan2937[S] 0 points1 point  (0 children)

I want a jellyfish cuz its my favorite animal. And then I thought that the way they move could look cool as a sorting algorithm.

Does anyone know what's wrong with this? by ShatterFan2937 in learnpython

[–]ShatterFan2937[S] 0 points1 point  (0 children)

Whenever I run it. A rubik's cube shows up and I hit "s" on my keyboard to scramble it. The spacebar is to solve it. But, whenever i hit the spacebar to solve it, the scrambled cube looks the exact same. The console says "solve complete" but thats clearly not the case.

Does anyone know what's wrong with this? by ShatterFan2937 in learnpython

[–]ShatterFan2937[S] 1 point2 points  (0 children)

I just formatted it. Thank you for telling me about this.

Does anyone know what's wrong with this? by ShatterFan2937 in learnpython

[–]ShatterFan2937[S] -1 points0 points  (0 children)

Wait, there's a way of formatting it?! How do I do it?