This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-06-06 01:21:02

COOLcats312645
Scratcher
Registered: 2009-05-31
Posts: 9

My scratch bloggie! :)

FIRST POST!  lol

Today I will show you the baisics of a Calculator project.This will do:
Multiplication
Division
Addition
And Of couse Subtraction.
CALCULATING:
To "calculate" the answer use theese scripts:
<say[((  <{ number 1 }> <+> <{ number 2 }> ))  ]for( 5 )secs>
That one was for addition,but you could use the following for
((  <->  )) Subtraction
((  <*>  )) Multiplication
((  </>  )) Division
((  <+>  )) And Addition
THE REST:
Firstly we will create a sprite,It can be any sprite so go wild.
Now we will do the greetings:
<when green flag clicked>
<say[ Hello! ]for( 2 )secs>
<say[ I can do your Maths for you! ]for( 7 )secs>
<forever>
There should be an ask block here saying "What sort of maths?Multiplication,Division,Addition or Subtraction?"
<if><( answer <=> Multiplication )>
There should be an ask block here saying "Pick a number"
<set{ Number1 }to( answer
There should be yet anothe ask block here saying "Pick a number to multiply it by"
<set{ Number2 }to( answer
<say[ Your answer is... ]for( 2 )secs>
<say[ (( <{ Number1 }> <*> <{ Number2 }> )) ]for( 7 )secs>
<end>
<if><( answer <=> Division )>
There should be an ask block here saying "Pick a number"
<set{ Number1 }to( answer
There should be yet anothe ask block here saying "Pick a number to divide it by"
<set{ Number2 }to( answer
<say[ Your answer is... ]for( 2 )secs>
<say[ (( <{ Number1 }> </> <{ Number2 }> )) ]for( 7 )secs>
<end>
<if><( answer <=> Subtraction )>
There should be an ask block here saying "Pick a number"
<set{ Number1 }to( answer
There should be yet anothe ask block here saying "Pick a number to subtract from it"
<set{ Number2 }to( answer
<say[ Your answer is... ]for( 2 )secs>
<say[ (( <{ Number1 }> <-> <{ Number2 }> )) ]for( 7 )secs>
<end>
<if><( answer <=> Addition )>
There should be an ask block here saying "Pick a number"
<set{ Number1 }to( answer
There should be yet anothe ask block here saying "Pick a number to add to it"
<set{ Number2 }to( answer
<say[ Your answer is... ]for( 2 )secs>
<say[ (( <{ Number1 }> <+> <{ Number2 }> )) ]for( 7 )secs>
<end>
<end>
If you have any questions about this script I am more than happy to answer them!

If that has helped you I am happy to help you and if you have any suggestions or comments I will happily take them in,good or bad.


smile  yo! i live on the cool side of life! Come join me!  smile

Offline

 

#2 2010-06-06 01:27:27

cheddargirl
Scratch Team
Registered: 2008-09-15
Posts: 1000+

Re: My scratch bloggie! :)

Hmm, this topic doesn't show a project, but it's a very interesting calculator guide!  smile  I think this topic will do better in 'All About Scratch' - let's try moving it there.  wink


http://i.imgur.com/8QRYx.png
Everything is better when you add a little cheddar, because when you have cheese your life is at ease  smile

Offline

 

#3 2010-06-06 01:50:42

Blade-Edge
Scratcher
Registered: 2009-06-13
Posts: 1000+

Re: My scratch bloggie! :)

I applaud your use of the forum blocks for making this guide instead of taking the easy way out and using screenshots. I admire your determination. Good guide, also.
I don't know what to say about the blog idea though, but it'll probably work itself out


http://img29.imageshack.us/img29/5145/scratchycat.gif CLASSY

Offline

 

#4 2010-06-06 06:48:21

laser100
Scratcher
Registered: 2009-12-04
Posts: 100+

Re: My scratch bloggie! :)

I like this.

Offline

 

#5 2010-06-06 12:39:39

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: My scratch bloggie! :)

Wow, wonderful guide! Well done.

Offline

 

Board footer