• 0 Posts
  • 6 Comments
Joined 1 year ago
cake
Cake day: June 9th, 2023

help-circle


  • fri@compuverse.ukto196@lemmy.blahaj.zonerule
    link
    fedilink
    arrow-up
    27
    ·
    1 year ago

    Wait, what happened in the second to last bullet point? You can’t convert a power like that when subtracting (you can when dividing).

    It’s like you’d convert “2^4 - 2” into “2^(4-1)”, which gives two different results (14 vs 8).


  • I never understood why in the 100-door case, the host opens 98 doors, and not just one door. That feels like changing the rules.

    I fully understand the original problem with 3 doors; I know the win probability is 2/3 if you change. But whenever I hear the explanation for 100 doors case, it just makes everything confusing. By opening 98 doors, it feels like the host wants you to switch to the other door. In 3 doors case it’s more natural.


  • fri@compuverse.uktoProgrammer Humor@lemmy.mlWar Crimes
    link
    fedilink
    arrow-up
    91
    ·
    edit-2
    1 year ago

    Looks like it creates a few emoji printers in a vector, then prints them all. The output is all emoji, of course. The main function exits with a random return value just to be more quirky.

    I’m not sure what the purpose of the 😎 function is. In main that first predicate is always true, so it prints the poop emoji. I don’t know why it’s behind an if.

    Also, there’s a copy-paste error on line 31. Wrong emoji is used.