Chance block

this is the chance block Snap! Build Your Own Blocks

You really don't need the second input. Since all numbers are equally likely, and you're only reporting whether the number was matched, just always compare against 1.

I would like to say that this is in the wrong category, Lists. It should be in Operators. Besides the definition, where a list block is used to provide the block's functionality, it has nothing to do with lists.

Also, I think the block name is too long. I don't expect blocks to be this long in width and still one line in height.

you can also just do this:
where 1in0 chance is 50%


where 1in0 chance is 100%


where 1in0chance is 0%

I think you mean 1 TO NUM.

yes. and it shoulda been in operators. and a predicate. I'm changing it now :)

it uses lists, that's why

I'm kinda lazy and don't know complex things so I just added a second input

i'm sorry, you didn't look in the definition :rofl:

I'm just creative

The reason people say that it should be in operators, is not because it doesn't use lists, but instead it's because outside the definition, you don't use lists.

However, there's really nothing wrong with sticking this block in the lists category over the operators category, it's purely just for aesthetics and categorization. You don't have to change the category if you don't feel like it.

https://snap.berkeley.edu/snap/snap.html#present:Username=freakbot&ProjectName=chance%20block

I don't understand.

could you please read the replies instead of laughing at us?
also, could you please stop posting multiple replies consecutively? its getting annoying.
you already posted the link

in the OP, so why post it again?
btw thanks for apologizing. I know many people who would never do that :)

yeah I know you don't understand bc I replied to bh

Anyone who reads this topic can read any reply, even if it’s not directed towards them.

not if it is deleted

nice! i've actually been working on my own chance library

if a topic has more than 0 replies you can't delete it yourself

Can you show it to me?

one second let me pull it up