Discuss Scratch

clay231
Scratcher
5 posts

New Block: () Is Even/Odd?

Tronche2Cake wrote:

if <(round ((n) / (2))) = ((n) / (2))> then
even
else
odd
end


that's exactly what i did
ARandomNumberIs7482
Scratcher
1000+ posts

New Block: () Is Even/Odd?

clay231 wrote:

Tronche2Cake wrote:

if <(round ((n) / (2))) = ((n) / (2))> then
even
else
odd
end


that's exactly what i did
that's what i did too

“Medians NOT bamboozled by Scratch 3.0!?”: https://scratch.mit.edu/discuss/topic/679077/?page=6#post-7299950
snowbank4
Scratcher
48 posts

New Block: () Is Even/Odd?

if < ((num) / (2)) contains [.(period) ] ?> then
set [even_or_odd v] to [odd]
else
set [even_or_odd v] to [even]
end

Last edited by snowbank4 (July 23, 2023 19:55:29)


when I receive [you want follow v]
move to [snowbank4 profile v]
click follow snowba

oh darn it a kumqu-nomnomnomnom
medians
Scratcher
1000+ posts

New Block: () Is Even/Odd?

snowbank4 wrote:

if < ((num) / (2)) contains [.(period) ] ?> then
set [even_or_odd v] to [odd]
else
set [even_or_odd v] to [even]
end
By the way, the contains operators block didn't exist in Scratch 2.0, so you're going to have to color it with scratchblocks syntax
Also I'm thinking you could also extend it to decimals like this:
https://scratch.mit.edu/discuss/post/7302132/

Sheep_maker wrote:

I've also noticed that the note input (such as the one in the Music extension) turns red when the given number is invalid, and it tries to correct the value when you click away, but other inputs don't do that
TIL!
Oh my god I never knew this I thought they would have kept this ability in 3.0, and I had to test this.
And I'm not sure if it's my extensions, but I can only see the correcting value thing.

Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that

Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.

Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness
i trolled redcat LOL





if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;

Powered by DjangoBB