This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-10-24 23:56:59

ConnairePetra
New Scratcher
Registered: 2012-09-19
Posts: 1

HELP PLEASE! Maths game! URGENT!!!

Hi there I was really hoping for help on this. I am creating a maths game and one of my questions goes like so:

QUESTION: What is a equation that adds up to 10?

I was hoping the answer the user would tope in would be anything that would equal 10 e.g 5+5 or 8+2 etc...

But I can't seem to do it. I have just done if answer = 10, but that doesn't work because I have to write in the actual number ten.

Help would be greatly taken

Offline

 

#2 2012-10-25 01:53:01

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: HELP PLEASE! Maths game! URGENT!!!

The simplest way I can think of: specify that both numbers have to be positive and one digit.

Then, because they're one digit, the first character is the first number, and the third is the second number.

So take "letter (1) of (answer)" and add it to "letter (3) of (answer)"
(the letter (#) of (string) block is in operators)

Once you add it up, you can see if it's equal to 10.

Offline

 

#3 2012-10-25 05:49:16

Maki-Tak
Scratcher
Registered: 2008-03-10
Posts: 100+

Re: HELP PLEASE! Maths game! URGENT!!!

Instead of an input box, use slider variables!
Make two slider variables. Use a script to add em together. If variable plus variable equals 10, broadcast correct.


http://i.cubeupload.com/zZE0XJ.png

Offline

 

Board footer