wow. i know i liked this project a lot before.. but im trying to incorporate a calculator into one of my next projects and it is out of my grasp. i looked at your code and i cant even begin to understand it! if its alright, id like to use your calculator for my project (assuming i can understand it well enough to manipulate your code).
Sure...that's what it's for :) I hope it works well for you. I've had some trouble importing projects that use lists into other projects though...if you have trouble, try starting with this project and importing the other one and see if that works any better.
Ha, I always preferred my brain over a calculator. :) I shun the use of calculators for problems that don't require it, but I suppose this is an advancement in Scratch programming, which is a good thing. Hmm, and I speaking of mathematical constants, I've still got to memorize 20 more digits of E. I take joy in knowing as many digits as I can of Pi, and I figure I should do that with E, too.
In short, very nice project. :)
Doing calculations without a calculator is a great mental workout! And it is amazing what you can train your memory to do. I once memorized all the sines of the angles to four places for angles from 0 to 90 degrees. This was before there was anything good to watch on TV, of course :)
When computing a complicated math expression, there are a couple of ways to do it...you can either just do it left-to-right (which would give 400 like you say), but most programs have something called "operator precedence" which means some operations are done first, regardless of where they show up in the expression. So the ^ operation is done first, then any * or / followed by +-. Parentheses override those rules though. Hope that helps some :)
you online? i'm working on one that you enter an addition problem... i''m only ten, so... it calculates it in one script... my one before didn't work...
hi..i seem to be having trouble viewing my latest project online..it could just be my computer..if you have time could you check to see if that is the case as i wanted to submit it to scratch design studio..light and dark themed gallery which seems to want projects involving shadows..
Yeah...I probably could have. I think I was thinking that other people might want to export this and import it into their own projects. That's easier to do when the scripts are on a sprite :)
I hope that's not the case...your calculator is very good and has an actual graphic interface, unlike mine. My hope was that I could show some interesting things that the new text processing blocks let you do :)
Hmm... It seems as though the link I gave you before doesn't work. Try this one: (link to forums)
Otherwise it is under the Inspiration and More section of the forums and it is called 'There's probably no God. Stop worrying and enjoy your life'
Thanks Blueflame - We've been watching that topic pretty closely and, while it has gotten a bit heated at times, mostly it has been respectful dialog so we have left it open. If there is a particular post you find offensive, please use the Report button to bring it to our attention. Thanks!
Hi Paddle2See. I don't want to 'spam' or write something unrelated on your project, but there is a topic on the forum that I think needs to be deleted. This is because it has nothing to do with Scratch and could be offensive. Please could you and the Scratch team look into it? Here it is: (link to forums)
Thank you.
do you have any clue to why this project (link to project) doesn't work? I think it might be because there are too many scripts. how could I make it work?
Nope...it had something to do with the value of "e" in my constant values list. There was some kind of weird non-printing character at the end that was messing things up. I took it out and all seems well now.
by the way, what is the % function for? I mean, in the scripts, it shows that it is obviously the opposite of the proceeding expression, but you don't show it in project notes...
The minus sign can either be a binary operator (3-5) or a unary operator (-5). So, to avoid confusion, when I parse the line into fields, if I sense that it is a unary operator, I substitute a % sign.
as you may be able to see, not that you would have noticed as much as some of the other users that I have chatted with often over the summer, my language is now very specific and well though, and I am typing very fast exporting my now abundant thoughts very quickly. this is because I have recently re-begun taking my ADHD meds so I am now more focused so expect more highly mathematical projects that have had lots of time spent on them.
since this is the best calculator engine on scratch, besides perhaps remixes of this one, the sooner you fix these bugs, perhaps with the help of others since you must be so busy being nice and helpful and kind and encouraging and commenting great comments on everyone's projects (that was a complement :D), then the sooner everyone else's projects that are based off of this engine also work better without them having to spend their time fixing the bug themselves.
for example, I have found a bug where you input "pi+e" and the result is neither "pie" (that is a joke btw) OR what it is supposed to be: its output is equal to pi, it seems that you used a variable that you exported the value of pi onto that you also exported the value of e onto, so that when you wrote over with pi you overwrote the stored value of e. that is just one example.
I might use this as part of a scratch interpreter language, adding a var function for code use, like var 1 takes item 1 from a list of variables and var 2 takes item 2 from the array variables. using an array for storing the variables makes it so that you can use an infinite amount of variables. this project you made here is an almost-ideal engine for many other projects, but unfortuanately, it DOES have a few bogs I have found that still are present.
If you want to discuss the future directions of Scratch, you might want to send an email to help@scratch.mit.edu. It will get forwarded to the development team.
The next step...a matter of some debate. Some think Alice is a natural progression. Others say Flash/Actionscript. Of course, Squeak is another choice since Scratch is written is Squeak. The source for Scratch is freely available.
I don't think so...I guess it depends on whether the calculator design is copyrighted. I doubt they would have an issue with a non-commercial product - but I'm not a lawyer :)
Sorry if you consider this as a spam
PLease ckeck out my new project at
/projects/fanofcena/650060
I have worked a lot making it and want you to see that
sorry to bother you again but i am tring to make a new scratch and i already have scratch image file and can write the formula but is there something else? it dosnt seem to be working when i preview it?
Hi Paddle2See! I was just wondering if you could get banned for what you write in the scripts, like if you named a variable a swear word, but didn't show the variable? I made a forum post about this as well: (link to forums)
Interesting question...I can't say that I've ever run into that situation. My feeling is that you could. Inappropriate material is still inappropriate, even if it is only going to be seen by people that download the project.
Check out our Numbers Gallery (the first major effort of the Super School Team) I think it is the best thing since sliced bread and will get Scratch into schools of course you and the Scracth team need to push it. (link to gallery)
im having some trubble (this is pinochio) in the pointlessprojects team gallery i told the members the password, so they could upload projects. but apparently someone took the password, signed in, and made innapropriate projects ( with the f word) and VERY innapropriate comments. i flagged and deleted them. how can i keep the account safe but still let team members know the password?
This project will evaluate a math expression that you type in using normal Infix notation, such as
(3+2)*10 + 5^2 - sin 45
It knows the usual math operators (operator precedence is applied):
+ Addition - Subtraction * Multiplication / Division ^ Raise to a power
It also knows parenthesis () and the following functions:
sqrt Square Root sin Sine cos Cosine tan Tangent asin Arcsine acos Arccosine atan Arctangent
It knows a couple of constants as well:
x The result of the last calculation pi Pi e Euler's number phi Golden Ratio
Bugs ==== Sadly, due to a bug with the JOIN block, decimal points in numbers DO NOT WORK on the downloaded project. You can work around this by using commas instead of decimal points. This bug does not seem to be present in the online player. The development team is working on this bug and hopefully will have it fixed soon.
Technical Notes =========== This evaluator takes the Infix string and first converts it to a list of Infix elements. Next, is uses a modified version of the Shunting Yard Algorithm (see wikipedia) to convert the Infix list to a Postfix list (Reverse Polish Notation) which it finally evaluates.
Comments
You need to be logged in to post comments
Add a Comment
wow. i know i liked this project a lot before.. but im trying to incorporate a calculator into one of my next projects and it is out of my grasp. i looked at your code and i cant even begin to understand it! if its alright, id like to use your calculator for my project (assuming i can understand it well enough to manipulate your code).
Sure...that's what it's for :) I hope it works well for you. I've had some trouble importing projects that use lists into other projects though...if you have trouble, try starting with this project and importing the other one and see if that works any better.
(view all replies)Cool! I make a GUI calculator here: (link to project) It is very simple
found a glitch: 1-0.9=0.09999999999..8
its because scratch uses floating point variables which has a habit of sometimes but rarly make a error of about 1E-10
Not necessarily a glitch. What it means is .099999999... repeating forever, and .099999999999... IS equivalent to .1.
cool
That is soooooo cool could you check out my new game called World war 3 I think you will like it : )
Ha, I always preferred my brain over a calculator. :) I shun the use of calculators for problems that don't require it, but I suppose this is an advancement in Scratch programming, which is a good thing. Hmm, and I speaking of mathematical constants, I've still got to memorize 20 more digits of E. I take joy in knowing as many digits as I can of Pi, and I figure I should do that with E, too. In short, very nice project. :)
pi is 3.141592653589793238462643383279. And still trying to memorize some more.
(view all replies)Doing calculations without a calculator is a great mental workout! And it is amazing what you can train your memory to do. I once memorized all the sines of the angles to four places for angles from 0 to 90 degrees. This was before there was anything good to watch on TV, of course :)
(3+2)*4^2= (20x20) DOES NOT equal 79.999999999999997 ^^^20 Im PRETTY SURE it equals 400
When computing a complicated math expression, there are a couple of ways to do it...you can either just do it left-to-right (which would give 400 like you say), but most programs have something called "operator precedence" which means some operations are done first, regardless of where they show up in the expression. So the ^ operation is done first, then any * or / followed by +-. Parentheses override those rules though. Hope that helps some :)
(view all replies)Nope. The raise-to-the-power operator takes precedence so it's the equivalent of (3+2)*(4^2) = 5 * 16 = 80
(view all replies)watch out for it!
Okay! Looking forward to it :)
(view all replies)you online? i'm working on one that you enter an addition problem... i''m only ten, so... it calculates it in one script... my one before didn't work...
you online??
You've just inspired me to make my own! Great job!
That's great! Drop me a comment when you get it done :)
(view all replies)Incredible engine! May I use?
Sure! That's what it's there for :)
(view all replies)why does 6^2 get 35.9999999999999999999999999999999999999999999999999999999999999999999999999999999999 instead of 36?
Small errors in the logarithm function I am using to do powers, I suspect. Kind of a pain...
(link to project)
hi..i seem to be having trouble viewing my latest project online..it could just be my computer..if you have time could you check to see if that is the case as i wanted to submit it to scratch design studio..light and dark themed gallery which seems to want projects involving shadows..
amazing!
see my calc it looks like a real calc but it has 46 digits. its called - Scientific calculator 46 digits
(view all replies)couldn't you just put the scripts in the background instead of creating a sprite?
Yeah...I probably could have. I think I was thinking that other people might want to export this and import it into their own projects. That's easier to do when the scripts are on a sprite :)
(view all replies)a friend told me you could help me,please take a look (link to project)
Oh, I didn't realize it's in the instructions! Sorry!
What does ^ mean???
Raise to a power...so 5^2 means 5 raised to the second power or 5*5. 5^3 means 5 raised to the third power or 5*5*5.
Very awesome!
awsome!
Yet another calculator that makes mine seem feeble. *love it*
Right! Lots of possibilities :)
I hope that's not the case...your calculator is very good and has an actual graphic interface, unlike mine. My hope was that I could show some interesting things that the new text processing blocks let you do :)
(view all replies)Sir, You can add projects to my Art gallery (link to gallery) Thank you...Regards...Ahaan.
could you see this please? (link to project)
Hmm... It seems as though the link I gave you before doesn't work. Try this one: (link to forums) Otherwise it is under the Inspiration and More section of the forums and it is called 'There's probably no God. Stop worrying and enjoy your life'
Thanks Blueflame - We've been watching that topic pretty closely and, while it has gotten a bit heated at times, mostly it has been respectful dialog so we have left it open. If there is a particular post you find offensive, please use the Report button to bring it to our attention. Thanks!
Hi Paddle2See. I don't want to 'spam' or write something unrelated on your project, but there is a topic on the forum that I think needs to be deleted. This is because it has nothing to do with Scratch and could be offensive. Please could you and the Scratch team look into it? Here it is: (link to forums) Thank you.
works when you download it
I thought it worked online too...what's not working?
(view all replies)yep
nice, i love it
It works sort of online, but not at all when you download it!
do you have any clue to why this project (link to project) doesn't work? I think it might be because there are too many scripts. how could I make it work?
I used your Calculator for my Math homeworks ;) My Calculator "real" has broken :(
Yay! I made something useful :)
hmm, the glitch appears to only be present online. must be just a java glitch, something to do with the lists.
Nope...it had something to do with the value of "e" in my constant values list. There was some kind of weird non-printing character at the end that was messing things up. I took it out and all seems well now.
(view all replies)by the way, what is the % function for? I mean, in the scripts, it shows that it is obviously the opposite of the proceeding expression, but you don't show it in project notes...
The minus sign can either be a binary operator (3-5) or a unary operator (-5). So, to avoid confusion, when I parse the line into fields, if I sense that it is a unary operator, I substitute a % sign.
so remember that glitch :D
Thanks! I'll look into it :)
as you may be able to see, not that you would have noticed as much as some of the other users that I have chatted with often over the summer, my language is now very specific and well though, and I am typing very fast exporting my now abundant thoughts very quickly. this is because I have recently re-begun taking my ADHD meds so I am now more focused so expect more highly mathematical projects that have had lots of time spent on them.
since this is the best calculator engine on scratch, besides perhaps remixes of this one, the sooner you fix these bugs, perhaps with the help of others since you must be so busy being nice and helpful and kind and encouraging and commenting great comments on everyone's projects (that was a complement :D), then the sooner everyone else's projects that are based off of this engine also work better without them having to spend their time fixing the bug themselves.
for example, I have found a bug where you input "pi+e" and the result is neither "pie" (that is a joke btw) OR what it is supposed to be: its output is equal to pi, it seems that you used a variable that you exported the value of pi onto that you also exported the value of e onto, so that when you wrote over with pi you overwrote the stored value of e. that is just one example.
I might use this as part of a scratch interpreter language, adding a var function for code use, like var 1 takes item 1 from a list of variables and var 2 takes item 2 from the array variables. using an array for storing the variables makes it so that you can use an infinite amount of variables. this project you made here is an almost-ideal engine for many other projects, but unfortuanately, it DOES have a few bogs I have found that still are present.
coolio
Whoa this is impressive!
It would be even more impressive if it had error checking :) But thank you for the nice comment. It's good to hear from you again.
Can I Use the calculator in my project? I'll give you credit!
Of course! Help yourself :)
(view all replies)Is it illegal to build a computer clone of a calculator like a TI81 for example?
If you want to discuss the future directions of Scratch, you might want to send an email to help@scratch.mit.edu. It will get forwarded to the development team.
The next step...a matter of some debate. Some think Alice is a natural progression. Others say Flash/Actionscript. Of course, Squeak is another choice since Scratch is written is Squeak. The source for Scratch is freely available.
(view all replies)I don't think so...I guess it depends on whether the calculator design is copyrighted. I doubt they would have an issue with a non-commercial product - but I'm not a lawyer :)
(view all replies)Cool!!!
When you going to make another project?
Well, it's online now :)
I'm working on a Roulette wheel gambling game right now. It's almost ready.
(view all replies)Sorry if you consider this as a spam PLease ckeck out my new project at /projects/fanofcena/650060 I have worked a lot making it and want you to see that
SOrry i could just send you the half project link as the site is not allowing me to send the full link
sorry to bother you again but i am tring to make a new scratch and i already have scratch image file and can write the formula but is there something else? it dosnt seem to be working when i preview it?
Sorry...I've never messed around in Squeak so I don't know how to fix your problem. The forums are your best resource.
(view all replies)Hi Paddle2See! I was just wondering if you could get banned for what you write in the scripts, like if you named a variable a swear word, but didn't show the variable? I made a forum post about this as well: (link to forums)
Interesting question...I can't say that I've ever run into that situation. My feeling is that you could. Inappropriate material is still inappropriate, even if it is only going to be seen by people that download the project.
Check out our Numbers Gallery (the first major effort of the Super School Team) I think it is the best thing since sliced bread and will get Scratch into schools of course you and the Scracth team need to push it. (link to gallery)
Paddle2see help! (link to forums)
Heres my idea for the front page: (link to project) Fionan suggested telling the scratch team my ideas.
im having some trubble (this is pinochio) in the pointlessprojects team gallery i told the members the password, so they could upload projects. but apparently someone took the password, signed in, and made innapropriate projects ( with the f word) and VERY innapropriate comments. i flagged and deleted them. how can i keep the account safe but still let team members know the password?
We don't like to see accounts being shared for that very reason. Instead, make a gallery and give your friends permission to add projects to it.
(view all replies)when is scratch 1.5 coming out
Yeah, I'm not sure. In the past, there have been new releases about every six months.
(view all replies)sorry to be such a bother, but do you have any info about the bug?
No, sorry. I just submit the bug reports...it could be months before it is fixed. They don't release new versions of the Java player very often.
(view all replies)I've made some projects recently which you might like: (link to project) (link to project)
Awesome! I never knew about this method... Mind if I add graphing capability to it?
All done! The remix is here: (link to project)
Can you please see my fighting engine I've figured out a way to create combo moves like regular fighting video games (link to project)
oops (link to project)
Ooops...the link leads nowhere?
(view all replies)Sorry to bother you Paddle, but I am in need of help with a project. (link to project) It involves math and physics. Thanks!
are you working on anything?
Just tracking down bugs and stuff...
(view all replies)