I did this task by creating 4 variables, they were for the 1st number, 2nd number, actual answer and our own answer. I started by making the 1st and 2nd number variables generate random numbers each time i clicked the "new sum" sprite that i created.
I then created an answer sprite and when clicked it would either switch to a costume that said incorrect or correct depend if you were right or wrong. This was made possible by the "If" command; If input number= 1st number + 2nd number "switch to costume 2" which would mean correct and if the incorrect it was exactly the same except i used the "Not" command ( If "Not" input number= 1st number + 2nd number "switch to costume 3". If the answer was wrong the answer variable would show the right answer.
I also made the "New Sum" sprite reset everything by using broadcast. So when clicked it would broadcast "reset" and then i used the command "When i receive :reset" then set number variables to random, answer and input answer variable to 0 and "answer" sprite back to costume 1 which read answer.
I did not find this task difficult at all because scratch is an easy to use program with its simple layout and lego-like scripts.
My "answer" sprite script
Before answer check:
Correct:Incorrect:
Click this link for the Etoys version of this; By Mr.Uknown : http://mrunknown1337.blogspot.com/
good work
ReplyDelete8/8