I'm trying to find all the combonations of four certain numbers to make a scratch project, but is there an easier way???
Offline
I'm trying to make a math 24 game solver but the only way I can think of doing it is to find how many combonations there are with + - * and /. But there has to be an easier way, right?
Offline
In order to make a project, I need to find all the combonations of 4 numbers. But can a few scripts help me find it easier??
Offline
Robot_Maniac wrote:
In order to make a project, I need to find all the combonations of 4 numbers. But can a few scripts help me find it easier??
Oh! Thanks.
Now, excuse me for being slightly ignorant, but do you mean "combinations" as in "ways to add, subtract, multiply, and divide them" or "ways to order them to make a larger number?"
Offline
ways to add, subtract, multiply, and divide them.
Offline
Robot_Maniac wrote:
ways to add, subtract, multiply, and divide them.
I'm afraid there is pretty much only one way: use a script for every possible combination of adding, subtracting, multiplying, and dividing them. Sorry I can't be of much help.
Offline
Oh, so it's kinda link this???
[blocks]
<when green flag clicked>
<forever>
<if>(( Number <+>Number ))((Number <+>Number ))<( <=> 24 )>
<say[I've found the answer! ]for( 2)secs>
Offline
Robot_Maniac wrote:
Oh, so it's kinda link this???
[blocks]
<when green flag clicked>
<forever>
<if>(( Number <+>Number ))((Number <+>Number ))<( <=> 24 )>
<say[I've found the answer! ]for( 2)secs>
Yes, and then switch it up every time.
Offline
Just so you know, 24 is a math game with cards. Each card has 4 numbers on it. You have to add, subtract, multiply, and divide those numbers to try to make "24".
Offline
Yes, I know that. So then I'm going to switch it up to maybe (Number+Number+Number-Number)
Offline