2014년 11월 30일 일요일

Using the random block

I need help, i posted last night, but someone answered my post with a completely wrong answer and marked it as completed, so i'm posting again.

PLEASE DONT MARK AS COMPLETE UNITL THIS QUERY IS COMPLETE


I am making a multiply choice quiz. I have my questions in a global list call 'listQ'  and the corresponding answer in a global list called 'listA'. 
For each question I have the correct answer and two wrong answers. I can take questions and answers in the order they were listed 

For example: i can call 1st item in listQ (and send it to my question box) and the 1st item in the listA (the correct answer and two wrong answers that are randomly assigned to my 3 multiply choice buttons. the 1st item in listQ and the 1st item in listA correspond as does the second and third etc. 

but i would like to randomise this process so that a random corresponding pair will be used. I can randomise the question, but i don't know how to make that randomisation process relate to the answers.

here is  link to the original post that has a screen shot of my blocks






Just because a post is marked as complete doesn't mean you can't continue it.  Starting another thread/topic is just wasting forum space.

Check your code... you're passing an empty list (0).



Ok, thank you for responding. I'm very new to all this! Please have patience.

I know why it's returning an empty list, it was because I followed the instructions wrong, and used the global index instead of listQ.

I did do it again and it just returned a runtime error featuring all the entires of listQ. 

If I make it simpler to explain: 

ListQ= 1+1, 2+2, 3+3
ListA= (2,5,7), (4,6,8), (6,5,8)
The first item in each sub list is the correct answer. 

I can call these items separately, one after the other starting from the first item in the list, but I want to randomise that process so that instead of starting at 1+1 (2,5,7) it can start at a random item on the list and continue to choose random item: 2+2 (4,6,8), 1+1 (2,5,7) 3+3 (6,5,8)

If someone could explain how to do this (perhaps with a screenshot of the needed blocks) I can incorporate it into my project. 

Thank again for your patience!

John

SCREENSHOT: My project is quite complicated and i don't know how to export am image of the whole project. is there a way?



ScreenShot:      

1) You can shrink the image slightly... in your browser, press the Ctrl key plus use the scroll wheel on your mouse (if you have one) to shrink the blocks...be careful, you shrink too much and the blocks become unreadable.

2) Make multiple screen captures of different parts of your block code and send multiple images.  

On Windows  Ctr + PrtScn  keyboard keys pressed at same time copies an image of the screen to the Windows Clipboard.  Open Paint and save the image by putting the contents of the clipboard into Paint. Save the image to your desktop or another folder as a png or jpg file.  On Win 7 and above you can use the Snipping tool (in Accessories) to capture an image of blocks directly from the screen.  Capture what you need and Save the file as to a folder on your PC.

On a Mac,  command-shift-3 (whole-screen) or command-shift-4 (drag a rectangle) to take a screenshot. The image file will appear on your desktop. 

To post an image to the forum:  Once you copy an image and named it something like capturedimage.png and you have put it in a folder on your PC;  find the blue Insert Image control in the forum text area (the icon is next to and left of the Link).  Press the icon.  A small screen opens..drag the capturedimage.png to the new screen; wait a few seconds while Google's forum loads the image to the text area.  Now the image is in the forum's text box area, ready to post.

Please save the images as a jpg or png file.   Other formats are possible but create problems for some forum members in reading your images.


댓글 없음:

댓글 쓰기