Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 7:39 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: How to get this be done
PostPosted: November 7th, 2009, 8:53 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
IF I have 6 letters
A B C D E F and I want to randomize them in ABC( 3 choices ) multiple choice,but C should be included from the 6 letters.

I hope that I explain it in clear way

_________________
Win windows 7
Opus Pro 9.5


For this message opuslover has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 7th, 2009, 10:51 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Hi OL,
'No' not so clear. Did you mean 'C' is to be 'excluded' (so only 5 letters really). Or 'C' is always to be one of the set of 3 letters ('C' plus 2 random from the other 5)?

Maybe you can provide an example with some context of question plus its multichoice answers. I am GUESSING that you are wanting to generate quizzes by having the one correct answer always included (but not always in position C or with label C). And then populate the wrong answers so that different versions of the test can be made. Is that it?

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 7th, 2009, 11:01 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
Hi lar
Yes ,exactly that is.
How could that be done?

_________________
Win windows 7
Opus Pro 9.5


For this message opuslover has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 7th, 2009, 11:02 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Opuslover,

There are all manor of ways of doing this. If you've not already got it - download our free random quiz example from our website.

You can easily change the multi-frame idea to display various combinations of right / wrong answers.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 7th, 2009, 11:09 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
hi mack
I already had your randomize
but as Lar said . i want one of the choices be included as a must

I random 6 words, then the choices will be only 3
one of these randomize should be included

the simplest way:

the random words are:

boy - school - girl - class - crayon - chair

question1
what is this?(a picture of a chair)
choose a , b or c:
a-school
b- boy
c.( should be chair) but I don't want it always to be c . It could be b or a



if we make it the normal ranmize way . maybe the chair ( which is the answer will not be included).

I hope this time clear.

_________________
Win windows 7
Opus Pro 9.5


For this message opuslover has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 7th, 2009, 11:19 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
It was clear first time :-)

The example we have always includes item one as the must. You can simply have X number of false answers from a pool of false answers.

But to do it through scripts, is the same principle. Just fixed variable, the right answer and pool of false answers - probably and array, the draw two false answers from this array and include with the true fixed answer.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 7th, 2009, 11:37 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
Mack
please could you post the code for doing this .

_________________
Win windows 7
Opus Pro 9.5


For this message opuslover has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 8th, 2009, 7:27 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
Hi all
No one could help solving this problem?
any suggestion is appreciared

_________________
Win windows 7
Opus Pro 9.5


For this message opuslover has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 8th, 2009, 10:40 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
OL,
I thought you were 'on your way' with Mack's offers above.

Quote:
any suggestion is appreciated
It's Sunday here, so I take the liberty of some short-cut answer....

I think you'll find 2/3 of a solution in a prior post:
viewtopic.php?t=2844&highlight=random+array (note these keywords... you may find other prior solutions too)
specifically:
Quote:
words1 = "fish,cat,rat,mouse,house,boat,float".split(",")

This will make myWords[0] equal fish etc

IF YOU NEED the second array (words2) separately, then yes you will also need to define this - else fill the first array with these words as an when you need them.

To get a random word from an array use:

myRandomWord = words1[String.random(words1.length)]

Some further ideas:
- if you always place your correct answer as the first or last item in the array, you can manipulate your random-choosing process to select from 'words1.length -1' guided appropriately for beginning subset or ending subset.
- I would find it easy to select 3 random --- and then replace one of those element's value with the '0' or 'last' element (the 'correct one'). The other way Mack suggested was select 2, and then insert or join so as to always include the correct answer value.

I think that covers it, depending how you present or sequence the final 3 possible answers.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 9th, 2009, 11:21 am 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
Thanks a lot Lar and Mack

I see it's difficult for me to do it that way

i want now to do in other way

1.how can I make sure that an element is exist in the array

2. how to do looping while this array contains this element and stop

I want the code for this thing

_________________
Win windows 7
Opus Pro 9.5


For this message opuslover has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 9th, 2009, 4:22 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
opuslover wrote:
I see it's difficult for me to do it that way


I doubt it but hey...

myArray = new Array(1,2,3,4,5,6,7,8,9)
myMatch = 7


1.

if (myArray[0]=myMatch)
{
Debug.trace("possunt quia posse videntur ")
} else
{
Debug.trace("cave canem ")
}

2.

var i =0
while (myArray[i] != myMatch)
{
Debug.trace("facile est inventis addere ")
i++
}

Mack or in Latin, Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Last edited by mackavi on November 9th, 2009, 8:03 pm, edited 1 time in total.

Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 9th, 2009, 6:15 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
hi Mack again

Debug.trace("possunt quia posse videntur ")

this Debug needs Debug.translation("Latin To Englsh")
then
var Mackavi=latin.String("possunt quia posse videntur ");

var myArray=Mackavi.split(" ");
myText.ReplaceSelection(myArray[2])
Debug.trace(myArray);

Thank you very much Macavi
I'll try to use your code in my way.

_________________
Win windows 7
Opus Pro 9.5


For this message opuslover has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 9th, 2009, 6:28 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
I've tried your code mackavi
for number 1 it doesn't work

your code is

myArray = new Array(1,2)
myMatch = 7


1.

if (myArray[0]=myMatch)
{
Debug.trace("possunt quia posse videntur ")
} else
{
Debug.trace("cave canem ")
}



it'll work by this way:

myArray = new Array(1,2)
myMatch = 7


1.

if (myArray[0]==myMatch)
{
Debug.trace("possunt quia posse videntur ")
} else
{
Debug.trace("cave canem ")
}

I'll try the second one and tell you.

_________________
Win windows 7
Opus Pro 9.5


For this message opuslover has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 9th, 2009, 8:01 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
opuslover wrote:
for number 1 it doesn't work


Oh, I don't know - if I run it I get a match every time - which seems good to me :-) :-) :-)

Mack

It ain't broken, if you don't care what it does.

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 9th, 2009, 8:04 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
P.S Modified the array contents as I have a vision of some poor person triggering an infinite loop :-)

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group