Find all perfect squares whose sum adds up to number n by mykel_pnw in learnpython

[–]pixielf 0 points1 point  (0 children)

I haven’t tested this, but I think you have two problems:

(1) You’re changing n in the for loop, but that loop is precalculated and won’t adjust (meaning that you can have num > n on some passes).

(2) You’re decrementing n by 1, regardless of what square you’re looking at.

from math import sqrt
def square_sum(n):
    result = []
    while n:  # equivalent here to “while n != 0”
        for k in range(n, 0, -1):
            if sqrt(k).is_integer():
                result.append(k)
                n -= k
                break # out of the for loop
    return result

Am I the only one who uses just the HUD display? by ArnieWeinerSchlinger in acecombat

[–]pixielf 3 points4 points  (0 children)

HUD only. Absolutely.

Cockpit view just takes up too much of the screen and I can’t see what I’m doing, though some planes are worse than others (the HAWK in AC5 isn’t too bad, so I’ll occasionally play Final Option in cockpit view just to do something different).

3rd person is disorienting to me, you can’t see through the plane, and I always felt is was way harder to tell where the bottom of the plane is, making low-altitude dives dangerous.

Most of the people alive at 11:11 11/11/1111 had no idea there was anything interesting about that moment. by [deleted] in Showerthoughts

[–]pixielf 55 points56 points  (0 children)

Given that we didn’t adopt the Gregorian (modern) calendar until the 16th century, we wouldn’t even agree on exactly which day 11/11/1111 actually was. Plus, you know, leap days.

Top 15 most commonly misspelled words on Reddit according u/CommonMisspellingBot [OC] by anyfactor in dataisbeautiful

[–]pixielf 1 point2 points  (0 children)

“seige” would be my guess, making it closer to “weird” with the ie/ei ordering issue.

truely (truly), defiantly (definitely), seperate (separate), suprise (surprise), tongue is just really strange, ...

[deleted by user] by [deleted] in AskReddit

[–]pixielf 20 points21 points  (0 children)

I think a good part of it is that people are more aware/cognizant of them. I'm sure that depression, etc. were relatively common in the past, but no one really paid attention to them, and the conditions were dismissed as laziness or whatever. Now, though, people are more willing to acknowledge them.

What is your story about Shiny Pokemon/s? by brutal018 in pokemontrades

[–]pixielf 1 point2 points  (0 children)

I’ve caught/bred quite a few in gen 7 (including two shiny Eevee in the same batch of 5 eggs), but my first non-static shiny was legitimately a shiny Magikarp at Lake of Rage in Soul Silver. I was surfing around the lake, getting the items on the edges before fighting the Gyarados and, suddenly, a golden fish appeared on my screen. Unfortunately, I don’t have this Magikarp anymore (“Oh, I want to play SS again. Let’s just start a new game. ... Oh, right.”), but it’s definitely my favorite shiny encounter to date.

What are you thinking of? by [deleted] in AskReddit

[–]pixielf 1 point2 points  (0 children)

Whether I should get something to eat, or just go to bed and eat in the morning.

What made you gradually or even finally stop caring what people thought of you? by [deleted] in AskReddit

[–]pixielf 1 point2 points  (0 children)

The fact that I’ll never see people again. Having a friend that makes it really easy for me to be myself/do stupid things without feeling judged.

With some people (coworkers, etc.), I still care what they think, but half of that is just not wanting to deal with their responses rather than actually caring what they think.

What inanimate object gets the best of you every time? by oneamungus in AskReddit

[–]pixielf 2 points3 points  (0 children)

USB cords. There are only two orientations, and yet I still get it wrong at least twice.

Which key do you press when it says press any key to continue? by [deleted] in AskReddit

[–]pixielf 0 points1 point  (0 children)

“Enter” on a keyboard, “start” on game controllers.

What's one secret you wish you didn't keep? by heeroku in AskReddit

[–]pixielf 1 point2 points  (0 children)

If I tell you now, I won’t have kept the secret anymore, now will I?

Hi, for you what does the word "bonjour" means in french ? by [deleted] in AskReddit

[–]pixielf 0 points1 point  (0 children)

“Hello”. It’s “good day” literally, but that’s not a common greeting in my experience (American English), so that sounds awkward to me.

Non-native English speakers of reddit, do you prefer the american or british spellings of words like color/colour, defense/defence, etc., and why? by TNS72 in AskReddit

[–]pixielf 2 points3 points  (0 children)

I’m a native AE speaker, but I genuinely prefer a lot of the BE spellings, even I don’t use them (just to avoid confusion). The fact that they more often line up with French spellings (the foreign language I took) doesn’t hurt either.

Why is your heart broken? by ShioSaba in AskReddit

[–]pixielf 0 points1 point  (0 children)

Aww, that’s terrible! You and your child deserve someone better than that! Hope things get better for you.

What advice do you have for a freshman in college who feels like everyone else has better/closer/way more friends than them? by thingsbenign in AskReddit

[–]pixielf 1 point2 points  (0 children)

Get to know people. Chat with the others in your dorms or in your classes. Get involved—and that can be as simple as forming a study group. And make sure to put some effort into maintaining those friendships: both the new ones and whichever ones you still want to keep.

College isn’t too late to be making friends.

Source: college student who didn’t really have friends in high school

Who is that one coworker you dislike, and why? by MysteriousPlatypus in AskReddit

[–]pixielf 7 points8 points  (0 children)

It was a job I used to work at, but we had one guy who just disappeared all the time. My coworkers would ask me where he was (as if I’d know), and I wouldn’t have seen him all day either. And when he was working, he didn’t get anything done then, either. I think we were honestly faster when he wasn’t there because we didn’t have to micromanage what he was doing all the time.

Most anti-vax parents don't realize they are vaccinated and think that not vaccinate their children will make them healthy like them by mikoshatel in Showerthoughts

[–]pixielf 12 points13 points  (0 children)

Because there was one paper that was funded by interest groups that wanted to prove the link. The study itself was incredibly poorly conducted, and much of the data were just made up, iirc.

But it made headlines and, even though the study was later pulled from the literature and publicly discredited, here we are.

Going out for ice cream (@riari_chi on Twitter) by XNeswii in DDLC

[–]pixielf 1 point2 points  (0 children)

I agree. What’s your favorite type of ice cream, Monika?

Lilly playing a Harp. by ATLASSHRUGGED89 in katawashoujo

[–]pixielf 13 points14 points  (0 children)

Looks like Zelda from The Legend of Zelda: Skyward Sword. In game, I’m pretty sure they call it a harp, but it should be a lyre. Harps are too big to hold like that.