Share your repls and programming experiences

← Back to all posts
A Representation of 50/50 chance
Zexogon (845)

Now i know this is not some amazing WOW NEW GAME project or anything but i made this and realized that this was a good representation of 50/50 chance how this works is that there is a 50% chance the program will add a to the string and there is a 50% chance that the program will take away a star from the program and running this shows how even your odds are. for me every time i run it the 's almost always take up about half the screen which shows how a 1 in 2 chance is truly 1 in 2. this can be represented with a coin toss too with the * side being heads and the blank side being tails. just a neat thing i made i thought you guys might want to see enjoy

Commentshotnewtop
Coder100 (2862)

Wow, super even distribution lol Right now there are so many stars that another line has been made to write all the text edit 3 edit 4
vote ++ for the humor

boothisrael (3)

This is like a really fun background or screensaver.

JeremyIrwin (39)

looks like stocks in a stock market, cool

MrEconomical (2195)

this is actually really nice
E

Zexogon (845)

@MrEconomical cheers m8 (also im sorry for the extremely incorrect html format i have been working hard to fix it :3

kingretracted (27)

What is this supposed to do?

[deleted]

:0 @Zexogon is back!

Zexogon (845)

@TaylorLiang yea me and @Warhawk947 have been working hard on a new game and the 1.0.0 should be dropping soon :3

[deleted]

@Zexogon

soon™

[deleted]

@Zexogon Your profile pic makes me want to bleach my eyes

[deleted]

@Zexogon also, can you send me a gif of your old profile pic

[deleted]

@Zexogon I dont like the old one, because I liked the old blob more (it was cute)

Zexogon (845)

@TaylorLiang ill put it back on that pfp is kinda my thing now tbh

[deleted]
Zexogon (845)

also this representation is not perfect because it is random just like its possible to flip 5 heads in a row so keep that in mind

EthanCulp (26)

Actually, it is random, it uses the random module to pick a random selection out of the list. Also, flipping a coin isn't actually random. If you flip a coin, the outcome depends on a bunch of stuff, like wind (if any), power of the flip, and the side the coin started on. All of this is manipulatable, so technically its not random @Zexogon

MatthewDoan1 (336)

@EthanCulp The random module is only pseudorandom.

._.

Zexogon (845)

@EthanCulp & @MatthewDoan1 i never really thought of it this way you guys are really teaching me a lot (also sorry if i put out false information it was just somthing i drew from a hypothetical in my mind)

EthanCulp (26)

Huh, well then, just ignore me then @MatthewDoan1

EthanCulp (26)

Oh no, not at all, I was just making a joke. I was just making a joke and as @MathewDoan1 pointed out, its only pseudorandom, soooo, just ignore me @Zexogon

MatthewDoan1 (336)

@EthanCulp @Zexogon Nothing is ever truly random, so to speak. Since everything depends on cause and effect, well, if you take into account the million billion trillion gazillion factors, such as the force of the flip and the pressure of the air, when you flip a coin, you'll be able to predict whether it lands heads or tails.

But don't mind me, I'm just being pedantic. Pseudorandom is pretty close to random.

Zexogon (845)

@MatthewDoan1 so do you guys like this project?

[deleted]

Random things:

  • Atmosphere
  • Quantum Stuff

NOT the random module.
@EthanCulp

Zexogon (845)

add or subtract the ammount of stars and the cut number to fit your screen size adding 1 star took only about 1/3 of my screen

Zexogon (845)

i might be wrong ok but at least i tried xD