Discuss Scratch

FuturePr0
Scratcher
100+ posts

I made a (very basic) calculator!

I've just shared a new project which is a calculator, it can do division, multiplication, adding, subtracting and square root problems! there are loads of lists and cloud variables for if you want statistics, if there is anything you think I can improve, tell me! You can see the project here.

Last edited by FuturePr0 (March 12, 2018 06:54:20)


This is my signature, it automatically appears under everything I say. To make your now signature, go here: https://scratch.mit.edu/discuss/settings/yourusernamehere
To tell if something is a signature, you should see a small faint gray line that separates my signature and my actual post


I have reached 100 posts! my 100th post was posted at 12:30:46 PM on the ‘things i’m making and creating' section, You can find the topic here. I am VERY good and skilful at so many things. Also you should see this!

My FAVOURITE colour is Orange
violet_raven
Scratcher
100+ posts

I made a (very basic) calculator!

I love how it's basic yet it works so well! I'm also working on a math project but I'm thinking about not doing it anymore because it's not really my style. Any tips?

when green flag clicked
forever
stop [whatever you're doing and go click the links below!]
end


Open “Mid-Air” PMV | Lemonade Tycoon | Art Dump | Pun Wars | Scratch World Animation


FuturePr0
Scratcher
100+ posts

I made a (very basic) calculator!

violet_raven wrote:

I love how it's basic yet it works so well! I'm also working on a math project but I'm thinking about not doing it anymore because it's not really my style. Any tips?
if you want to do my method, then you would do this, but if you don't understand then just put all the scripts in your backpack and move them to your project, please credit me because i was ill when i made this:
First of all, you need three variables:
(first number)
(second number)
(answer :: variables) //this is a variable you made, not blue from sensing.
WARNING: do not use the blue variable from sensing, make your own one from the data section. so it would be orange instead of blue.
so how this will work is you would have one sprite, that sprite will ask you a question. the sprites first question would be asking you if you want to do division, multiplication, adding, or subtracting.
ask [Do you want to do multiplication, division, adding or subtracting?] and wait
now the next step requires a lot of code, so i'm going to word it. if you still don't understand you can take the script to your backpack with a comment attached to it saying ‘for violet_raven’. And use it for your project, but i would like credit. Because i was VERY ill when i made this project. so you need to program it so that if your answer is ‘division’ it will broadcast ‘division’ if it's multiplication, it would broadcast ‘multiplication’ etc.
if <(answer)= [multiplication]> then //this time you DO want a blue answer block, only for the maths question selection.
broadcast [multiplication v]
end
now you want to make it so on the receiving end it does something, it will ask you what you want the first number to be and what to multiply by, divide add or subtract. A little like this:
when I receive [multiplication v]
ask [What do you want the first number to be?] and wait
set [first number v] to (answer) // for this you DO want the blue variable.
ask [what do you want to multiply by?] and wait
set [second number v] to (answer) //still using the blue variable. next step will use the variable you made that's orange.
and then this will be the script for the answers:
set [answer v] to ((first number) * (second number)) //the little star means multiply in programming. because there is no 'times' key.
(continued) on a normal keyboard. This is useful for if you want to mutliply. but if you want to divide, this would be the script.
set [answer v] to ((first number) / (second number)) //the slash  means divide in programming, because there is no 'divide' key.
(continued) on a normal keyboard. For adding it would be this:
set [answer v] to ((first number) + (second number)) //there is a plus on a normal keyboard so we just use an adding block.

set [answer v] to ((first number) - (second number)) //There is a minus key on the keyboard, just use the dash key.
then you could program the cat to say the answer.
say(join (join (join (join (first number) [add] ) (second number)) [equals] ) (answer :: variables)) //keep in mind your using the orange variable saying 'answer'. now
And NEVER give up! have fun!

Last edited by FuturePr0 (Feb. 11, 2018 16:13:34)


This is my signature, it automatically appears under everything I say. To make your now signature, go here: https://scratch.mit.edu/discuss/settings/yourusernamehere
To tell if something is a signature, you should see a small faint gray line that separates my signature and my actual post


I have reached 100 posts! my 100th post was posted at 12:30:46 PM on the ‘things i’m making and creating' section, You can find the topic here. I am VERY good and skilful at so many things. Also you should see this!

My FAVOURITE colour is Orange
TheAwesome98
Scratcher
21 posts

I made a (very basic) calculator!

FuturePr0 wrote:

violet_raven wrote:

I love how it's basic yet it works so well! I'm also working on a math project but I'm thinking about not doing it anymore because it's not really my style. Any tips?
if you want to do my method, then you would do this, but if you don't understand then just put all the scripts in your backpack and move them to your project, please credit me because i was ill when i made this:
First of all, you need three variables:
(first number)
(second number)
(answer) // this is meant to be orange, not the default blue from sensing.
WARNING: do not use the blue variable from sensing, make your own one from the data section. so it would be orange instead of blue.
so how this will work is you would have one sprite, that sprite will ask you a question. the sprites first question would be asking you if you want to do division, multiplication, adding, or subtracting.
ask [Do you want to do multiplication, division, adding or subtracting?] and wait
now the next step requires a lot of code, so i'm going to word it. if you still don't understand you can take the script to your backpack with a comment attached to it saying ‘for violet_raven’. And use it for your project, but i would like credit. Because i was VERY ill when i made this project. so you need to program it so that if your answer is ‘division’ it will broadcast ‘division’ if it's multiplication, it would broadcast ‘multiplication’ etc.
if <(answer)= [multiplication]> then //this time you DO want a blue answer block, only for the maths question selection.
broadcast [multiplication v]
end
now you want to make it so on the receiving end it does something, it will ask you what you want the first number to be and what to multiply by, divide add or subtract. A little like this:
when I receive [multiplication v]
ask [What do you want the first number to be?] and wait
set [first number v] to (answer) // for this you DO want the blue variable.
ask [what do you want to multiply by?] and wait
set [second number v] to (answer) //still using the blue variable. next step will use the variable you made that's orange.
and then this will be the script for the answers:
set [answer v] to ((first number) * (second number)) //the little star means multiply in programming. because there is no 'times' key.
(continued) on a normal keyboard. This is useful for if you want to mutliply. but if you want to divide, this would be the script.
set [answer v] to ((first number) / (second number)) //the slash  means divide in programming, because there is no 'divide' key.
(continued) on a normal keyboard. For adding it would be this:
set [answer v] to ((first number) + (second number)) //there is a plus on a normal keyboard so we just use an adding block.

set [answer v] to ((first number) - (second number)) //There is a minus key on the keyboard, just use the dash key.
then you could program the cat to say the answer.
say(join (join (join (join (first number) [add] ) (second number)) [equals] ) (answer)) //keep in mind your still using the orange variable saying 'answer'.
And NEVER give up! have fun!
(first number)
(second number)
(answer :: variables)

When I Think :: events
I like green :: operators
I mean Dark green :: sound
PEN!! :: pen
I hate troll OSes
Yeet! :: motion
I like Ugandan knuckles
forever if <I'm gay :: sound> :: control
Imagine :: events
Program :: pen
Share :: sound
end
FuturePr0
Scratcher
100+ posts

I made a (very basic) calculator!

TheAwesome98 wrote:

FuturePr0 wrote:

violet_raven wrote:

I love how it's basic yet it works so well! I'm also working on a math project but I'm thinking about not doing it anymore because it's not really my style. Any tips?
if you want to do my method, then you would do this, but if you don't understand then just put all the scripts in your backpack and move them to your project, please credit me because i was ill when i made this:
First of all, you need three variables:
(first number)
(second number)
(answer) // this is meant to be orange, not the default blue from sensing.
WARNING: do not use the blue variable from sensing, make your own one from the data section. so it would be orange instead of blue.
so how this will work is you would have one sprite, that sprite will ask you a question. the sprites first question would be asking you if you want to do division, multiplication, adding, or subtracting.
ask [Do you want to do multiplication, division, adding or subtracting?] and wait
now the next step requires a lot of code, so i'm going to word it. if you still don't understand you can take the script to your backpack with a comment attached to it saying ‘for violet_raven’. And use it for your project, but i would like credit. Because i was VERY ill when i made this project. so you need to program it so that if your answer is ‘division’ it will broadcast ‘division’ if it's multiplication, it would broadcast ‘multiplication’ etc.
if <(answer)= [multiplication]> then //this time you DO want a blue answer block, only for the maths question selection.
broadcast [multiplication v]
end
now you want to make it so on the receiving end it does something, it will ask you what you want the first number to be and what to multiply by, divide add or subtract. A little like this:
when I receive [multiplication v]
ask [What do you want the first number to be?] and wait
set [first number v] to (answer) // for this you DO want the blue variable.
ask [what do you want to multiply by?] and wait
set [second number v] to (answer) //still using the blue variable. next step will use the variable you made that's orange.
and then this will be the script for the answers:
set [answer v] to ((first number) * (second number)) //the little star means multiply in programming. because there is no 'times' key.
(continued) on a normal keyboard. This is useful for if you want to mutliply. but if you want to divide, this would be the script.
set [answer v] to ((first number) / (second number)) //the slash  means divide in programming, because there is no 'divide' key.
(continued) on a normal keyboard. For adding it would be this:
set [answer v] to ((first number) + (second number)) //there is a plus on a normal keyboard so we just use an adding block.

set [answer v] to ((first number) - (second number)) //There is a minus key on the keyboard, just use the dash key.
then you could program the cat to say the answer.
say(join (join (join (join (first number) [add] ) (second number)) [equals] ) (answer)) //keep in mind your still using the orange variable saying 'answer'.
And NEVER give up! have fun!
(first number)
(second number)
(answer :: variables)
Yes, those are the three variables you need (Thanks! ), and If you want square root, just use
([sqrt v] of (first number)

This is my signature, it automatically appears under everything I say. To make your now signature, go here: https://scratch.mit.edu/discuss/settings/yourusernamehere
To tell if something is a signature, you should see a small faint gray line that separates my signature and my actual post


I have reached 100 posts! my 100th post was posted at 12:30:46 PM on the ‘things i’m making and creating' section, You can find the topic here. I am VERY good and skilful at so many things. Also you should see this!

My FAVOURITE colour is Orange
TheAwesome98
Scratcher
21 posts

I made a (very basic) calculator!

FuturePr0 wrote:

TheAwesome98 wrote:

FuturePr0 wrote:

violet_raven wrote:

I love how it's basic yet it works so well! I'm also working on a math project but I'm thinking about not doing it anymore because it's not really my style. Any tips?
if you want to do my method, then you would do this, but if you don't understand then just put all the scripts in your backpack and move them to your project, please credit me because i was ill when i made this:
First of all, you need three variables:
(first number)
(second number)
(answer) // this is meant to be orange, not the default blue from sensing.
WARNING: do not use the blue variable from sensing, make your own one from the data section. so it would be orange instead of blue.
so how this will work is you would have one sprite, that sprite will ask you a question. the sprites first question would be asking you if you want to do division, multiplication, adding, or subtracting.
ask [Do you want to do multiplication, division, adding or subtracting?] and wait
now the next step requires a lot of code, so i'm going to word it. if you still don't understand you can take the script to your backpack with a comment attached to it saying ‘for violet_raven’. And use it for your project, but i would like credit. Because i was VERY ill when i made this project. so you need to program it so that if your answer is ‘division’ it will broadcast ‘division’ if it's multiplication, it would broadcast ‘multiplication’ etc.
if <(answer)= [multiplication]> then //this time you DO want a blue answer block, only for the maths question selection.
broadcast [multiplication v]
end
now you want to make it so on the receiving end it does something, it will ask you what you want the first number to be and what to multiply by, divide add or subtract. A little like this:
when I receive [multiplication v]
ask [What do you want the first number to be?] and wait
set [first number v] to (answer) // for this you DO want the blue variable.
ask [what do you want to multiply by?] and wait
set [second number v] to (answer) //still using the blue variable. next step will use the variable you made that's orange.
and then this will be the script for the answers:
set [answer v] to ((first number) * (second number)) //the little star means multiply in programming. because there is no 'times' key.
(continued) on a normal keyboard. This is useful for if you want to mutliply. but if you want to divide, this would be the script.
set [answer v] to ((first number) / (second number)) //the slash  means divide in programming, because there is no 'divide' key.
(continued) on a normal keyboard. For adding it would be this:
set [answer v] to ((first number) + (second number)) //there is a plus on a normal keyboard so we just use an adding block.

set [answer v] to ((first number) - (second number)) //There is a minus key on the keyboard, just use the dash key.
then you could program the cat to say the answer.
say(join (join (join (join (first number) [add] ) (second number)) [equals] ) (answer)) //keep in mind your still using the orange variable saying 'answer'.
And NEVER give up! have fun!
(first number)
(second number)
(answer :: variables)
Yes, those are the three variables you need (Thanks! ), and If you want square root, just use
([sqrt v] of (first number)
You do block :: name of type for example variables

Last edited by TheAwesome98 (Feb. 11, 2018 16:18:14)


When I Think :: events
I like green :: operators
I mean Dark green :: sound
PEN!! :: pen
I hate troll OSes
Yeet! :: motion
I like Ugandan knuckles
forever if <I'm gay :: sound> :: control
Imagine :: events
Program :: pen
Share :: sound
end
FuturePr0
Scratcher
100+ posts

I made a (very basic) calculator!

TheAwesome98 wrote:

FuturePr0 wrote:

TheAwesome98 wrote:

FuturePr0 wrote:

violet_raven wrote:

I love how it's basic yet it works so well! I'm also working on a math project but I'm thinking about not doing it anymore because it's not really my style. Any tips?
if you want to do my method, then you would do this, but if you don't understand then just put all the scripts in your backpack and move them to your project, please credit me because i was ill when i made this:
First of all, you need three variables:
(first number)
(second number)
(answer) // this is meant to be orange, not the default blue from sensing.
WARNING: do not use the blue variable from sensing, make your own one from the data section. so it would be orange instead of blue.
so how this will work is you would have one sprite, that sprite will ask you a question. the sprites first question would be asking you if you want to do division, multiplication, adding, or subtracting.
ask [Do you want to do multiplication, division, adding or subtracting?] and wait
now the next step requires a lot of code, so i'm going to word it. if you still don't understand you can take the script to your backpack with a comment attached to it saying ‘for violet_raven’. And use it for your project, but i would like credit. Because i was VERY ill when i made this project. so you need to program it so that if your answer is ‘division’ it will broadcast ‘division’ if it's multiplication, it would broadcast ‘multiplication’ etc.
if <(answer)= [multiplication]> then //this time you DO want a blue answer block, only for the maths question selection.
broadcast [multiplication v]
end
now you want to make it so on the receiving end it does something, it will ask you what you want the first number to be and what to multiply by, divide add or subtract. A little like this:
when I receive [multiplication v]
ask [What do you want the first number to be?] and wait
set [first number v] to (answer) // for this you DO want the blue variable.
ask [what do you want to multiply by?] and wait
set [second number v] to (answer) //still using the blue variable. next step will use the variable you made that's orange.
and then this will be the script for the answers:
set [answer v] to ((first number) * (second number)) //the little star means multiply in programming. because there is no 'times' key.
(continued) on a normal keyboard. This is useful for if you want to mutliply. but if you want to divide, this would be the script.
set [answer v] to ((first number) / (second number)) //the slash  means divide in programming, because there is no 'divide' key.
(continued) on a normal keyboard. For adding it would be this:
set [answer v] to ((first number) + (second number)) //there is a plus on a normal keyboard so we just use an adding block.

set [answer v] to ((first number) - (second number)) //There is a minus key on the keyboard, just use the dash key.
then you could program the cat to say the answer.
say(join (join (join (join (first number) [add] ) (second number)) [equals] ) (answer)) //keep in mind your still using the orange variable saying 'answer'.
And NEVER give up! have fun!
(first number)
(second number)
(answer :: variables)
Yes, those are the three variables you need (Thanks! ), and If you want square root, just use
([sqrt v] of (first number)
You do block :: name of type for example variables
I know. Thanks!

This is my signature, it automatically appears under everything I say. To make your now signature, go here: https://scratch.mit.edu/discuss/settings/yourusernamehere
To tell if something is a signature, you should see a small faint gray line that separates my signature and my actual post


I have reached 100 posts! my 100th post was posted at 12:30:46 PM on the ‘things i’m making and creating' section, You can find the topic here. I am VERY good and skilful at so many things. Also you should see this!

My FAVOURITE colour is Orange
TheAwesome98
Scratcher
21 posts

I made a (very basic) calculator!

FuturePr0 wrote:

TheAwesome98 wrote:

FuturePr0 wrote:

TheAwesome98 wrote:

FuturePr0 wrote:

violet_raven wrote:

I love how it's basic yet it works so well! I'm also working on a math project but I'm thinking about not doing it anymore because it's not really my style. Any tips?
if you want to do my method, then you would do this, but if you don't understand then just put all the scripts in your backpack and move them to your project, please credit me because i was ill when i made this:
First of all, you need three variables:
(first number)
(second number)
(answer) // this is meant to be orange, not the default blue from sensing.
WARNING: do not use the blue variable from sensing, make your own one from the data section. so it would be orange instead of blue.
so how this will work is you would have one sprite, that sprite will ask you a question. the sprites first question would be asking you if you want to do division, multiplication, adding, or subtracting.
ask [Do you want to do multiplication, division, adding or subtracting?] and wait
now the next step requires a lot of code, so i'm going to word it. if you still don't understand you can take the script to your backpack with a comment attached to it saying ‘for violet_raven’. And use it for your project, but i would like credit. Because i was VERY ill when i made this project. so you need to program it so that if your answer is ‘division’ it will broadcast ‘division’ if it's multiplication, it would broadcast ‘multiplication’ etc.
if <(answer)= [multiplication]> then //this time you DO want a blue answer block, only for the maths question selection.
broadcast [multiplication v]
end
now you want to make it so on the receiving end it does something, it will ask you what you want the first number to be and what to multiply by, divide add or subtract. A little like this:
when I receive [multiplication v]
ask [What do you want the first number to be?] and wait
set [first number v] to (answer) // for this you DO want the blue variable.
ask [what do you want to multiply by?] and wait
set [second number v] to (answer) //still using the blue variable. next step will use the variable you made that's orange.
and then this will be the script for the answers:
set [answer v] to ((first number) * (second number)) //the little star means multiply in programming. because there is no 'times' key.
(continued) on a normal keyboard. This is useful for if you want to mutliply. but if you want to divide, this would be the script.
set [answer v] to ((first number) / (second number)) //the slash  means divide in programming, because there is no 'divide' key.
(continued) on a normal keyboard. For adding it would be this:
set [answer v] to ((first number) + (second number)) //there is a plus on a normal keyboard so we just use an adding block.

set [answer v] to ((first number) - (second number)) //There is a minus key on the keyboard, just use the dash key.
then you could program the cat to say the answer.
say(join (join (join (join (first number) [add] ) (second number)) [equals] ) (answer)) //keep in mind your still using the orange variable saying 'answer'.
And NEVER give up! have fun!
(first number)
(second number)
(answer :: variables)
Yes, those are the three variables you need (Thanks! ), and If you want square root, just use
([sqrt v] of (first number)
You do block :: name of type for example variables
I know. Thanks!
Ah.

When I Think :: events
I like green :: operators
I mean Dark green :: sound
PEN!! :: pen
I hate troll OSes
Yeet! :: motion
I like Ugandan knuckles
forever if <I'm gay :: sound> :: control
Imagine :: events
Program :: pen
Share :: sound
end
violet_raven
Scratcher
100+ posts

I made a (very basic) calculator!

wow lol you know you don't need to quote every time you comment? XD

when green flag clicked
forever
stop [whatever you're doing and go click the links below!]
end


Open “Mid-Air” PMV | Lemonade Tycoon | Art Dump | Pun Wars | Scratch World Animation


FuturePr0
Scratcher
100+ posts

I made a (very basic) calculator!

violet_raven wrote:

wow lol you know you don't need to quote every time you comment? XD
I only do it when I'm replying to something.

This is my signature, it automatically appears under everything I say. To make your now signature, go here: https://scratch.mit.edu/discuss/settings/yourusernamehere
To tell if something is a signature, you should see a small faint gray line that separates my signature and my actual post


I have reached 100 posts! my 100th post was posted at 12:30:46 PM on the ‘things i’m making and creating' section, You can find the topic here. I am VERY good and skilful at so many things. Also you should see this!

My FAVOURITE colour is Orange
Scoopy55555
Scratcher
28 posts

I made a (very basic) calculator!

(☁ score)

Scoopy55555
Scoopy55555
Scratcher
28 posts

I made a (very basic) calculator!

What I was meant to say was that everyone's message is a good way and I would of done the same!

Scoopy55555

Powered by DjangoBB

Standard | Mobile