Press See Inside. Use the More Blocks. Once you're satisfied that this works, you may copy the script, so long as you post a comment with the link to the project. I am planning to hack blocks in this project to make it more user friendly, but I will get addition, multiplication, division and subtraction done first. Oh, and decimal numbers don't work. You'll have to multiply both numbers up by 10 or 3 or 7 or whatever is more convenient.
I am very proud of this project, as it has taken me a while to do. My first attempt at adding did not work, but there was nothing wrong with the code, it just did something other than adding. My second attempt did not work, but there was an error with the code. While using variable n as a counter, I did not change it as the code was repeated, and so 432+11=497+18. I fixed that and here it is! For the subtraction I had copied the addition script, and messed around with it so it worked perfectly. Then I had to change some more script so it could successfully return negative values, including adding another variable which either contained nothing or a negative sign, that I then put onto the end of it. Then I removed the variable in favour of using an if statement at the end of the code to add it if necessary. On the 4th of August I changed it so it would return 0 instead of nothing if the answer was 0. The multiplication script was thought up while working on another project, http://scratch.mit.edu/projects/25147659/ Secret Code, an example of RSA. The prime number generator was from that project too. The division script was based on the way the multiplication script worked, but coded almost completely differently. The factoriser stopped working because of the subtraction bug where it returned nothing instead of 0, but worked first try apart from that. Addition - 25 July 2014 Subtraction - 25 July 2014 Multiplication - 4 August 2014 Prime Number Generator - 4 August 2014 Division - 4 August 2014 Factoriser - 4 August 2014 Hack Blocks - To the Power of - Imaginary Number Handling - Imaginary Number Handling in To the Power of - Floating Point Handling - Projects using this script: http://scratch.mit.edu/projects/25147659/