Pages: 1
Topic closed
[Edit: Moderator Intrusiveness: I just added the quoted the original post here and removed the original one. Hope y'all don't mind, just thought it's simpler this way. --fullmoon]
ansman wrote:
Hi Guys,
I need your urgent response to do . How do I add the first 100 positive integer numbers in Scratch.
Hope to hear back from you soon.
Cheers
...What are you adding them to? A list? A variable? Etc.
Last edited by Harakou (2010-11-09 22:03:14)
Offline
let's make two variables, v1 and v2. [blocks]
<when green flag clicked>
<set{ v1 }to( 1 )>
<set{ v2 }to( 0 )>
<repeat( 100 )>
<change{ v2 }by( v1 )>
<change{ v1 }by( 1 )>
<end>[/blocks]
That should be it. If you need help, just ask.
Last edited by kayybee (2010-11-09 21:48:27)
Offline
ansman wrote:
Hi Guys,
I need your urgent response to do . How do I add the first 100 positive integer numbers in Scratch.
Hope to hear back from you soon.
Cheers
Try something like this:
[set [Number] to (0)]
[forever]
[][change [Number] by (1)]
[][add (Number) to [List]]
[end forever]
Offline
fullmoon wrote:
Code:
(last number in series - first number in series + 1)*((last # + first #)/2)So:
Code:
(100 - 1 + 1)*((100+1)/2) 100*(50.5) 5,050Hope that helps!
Win for Frederick Gaus!
Offline
kayybee wrote:
WAIT. HOW DID THIS BECOME HARAKOU'S TOPIC?!?!
Totally strange.
I was wondering the same thing!
Offline
ScratchReallyROCKS wrote:
kayybee wrote:
WAIT. HOW DID THIS BECOME HARAKOU'S TOPIC?!?!
Totally strange.I was wondering the same thing!
...
0.0

Offline
JeanTheFox wrote:
ScratchReallyROCKS wrote:
kayybee wrote:
WAIT. HOW DID THIS BECOME HARAKOU'S TOPIC?!?!
Totally strange.I was wondering the same thing!
...
0.0
He made two identical topics, so they combined them. But I think it didn't work out quite right.
Offline
Topic closed
Pages: 1