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)


BRUH
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?

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)


BRUH
TheAwesome98
Scratcher
37 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)

you know how someone can be smart and dumb?? I’m like that
when green flag clicked
think of a good signature::custom
set [output v] to (output of last [think of a good signature v]::custom)
if <(output::variables) fails::custom> then
make some more sus blocks::operators // figured out comments it’s just common “//” syntax
wait until <boolean variable::variables>
grey::grey
ring ({
test::grey
}::ring)::operators //works?? Can’t see it cause of sig height (can do later on desktop, see below)
end
how are you here? did they extend signatures or are you using the debugger? Anyway, it’s good to see you. I might put an Easter egg or some sort of ARG down here one day but for now, no.

Turns out, ctrl-shift-down while highlighting lets you see more so this is useless, but cool to know.
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)

BRUH
TheAwesome98
Scratcher
37 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)


you know how someone can be smart and dumb?? I’m like that
when green flag clicked
think of a good signature::custom
set [output v] to (output of last [think of a good signature v]::custom)
if <(output::variables) fails::custom> then
make some more sus blocks::operators // figured out comments it’s just common “//” syntax
wait until <boolean variable::variables>
grey::grey
ring ({
test::grey
}::ring)::operators //works?? Can’t see it cause of sig height (can do later on desktop, see below)
end
how are you here? did they extend signatures or are you using the debugger? Anyway, it’s good to see you. I might put an Easter egg or some sort of ARG down here one day but for now, no.

Turns out, ctrl-shift-down while highlighting lets you see more so this is useless, but cool to know.
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!

BRUH
TheAwesome98
Scratcher
37 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.

you know how someone can be smart and dumb?? I’m like that
when green flag clicked
think of a good signature::custom
set [output v] to (output of last [think of a good signature v]::custom)
if <(output::variables) fails::custom> then
make some more sus blocks::operators // figured out comments it’s just common “//” syntax
wait until <boolean variable::variables>
grey::grey
ring ({
test::grey
}::ring)::operators //works?? Can’t see it cause of sig height (can do later on desktop, see below)
end
how are you here? did they extend signatures or are you using the debugger? Anyway, it’s good to see you. I might put an Easter egg or some sort of ARG down here one day but for now, no.

Turns out, ctrl-shift-down while highlighting lets you see more so this is useless, but cool to know.
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

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.

BRUH
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
55thunder
New to Scratch
5 posts

I made a (very basic) calculator!

55thunder
New to Scratch
5 posts

I made a (very basic) calculator!

This is my Calculator


Adam_TheYt
Scratcher
28 posts

I made a (very basic) calculator!

55thunder wrote:

This is my Calculator



Please do not necropost.

hmmm

Powered by DjangoBB