Discuss Scratch

KingMCPEx
Scratcher
14 posts

Multiple Answers.

Hey, scratchers and curators!

I was wondering if someone could teach me why I can't add multiple answers to a quiz I'm working on.

I added the variable correct, and when I try to use “set correct to” more than once, it responds only to the last “set”

Please help me as this quiz is a school project I would like to get a good grade on.
mstone326
Scratcher
1000+ posts

Multiple Answers.

Without seeing your code I'd have to assume it is an order thing. Can you share?

I just looked at it. The correct seems to be setting itself correct but the answers are difficult for the user to type in the exact what you want. For instance, your last question said write a fraction = to .75. I wrote 3/4 and it was marked incorrect as you have 75/100 as the only correct. You may want to either prompt users in a specific way to lead them to input correctly.

Last edited by mstone326 (Feb. 27, 2017 17:06:33)

KingMCPEx
Scratcher
14 posts

Multiple Answers.

mstone326 wrote:

Without seeing your code I'd have to assume it is an order thing. Can you share?

I just looked at it. The correct seems to be setting itself correct but the answers are difficult for the user to type in the exact what you want. For instance, your last question said write a fraction = to .75. I wrote 3/4 and it was marked incorrect as you have 75/100 as the only correct. You may want to either prompt users in a specific way to lead them to input correctly.

That's what I did. It didn't work either, mate.
mstone326
Scratcher
1000+ posts

Multiple Answers.

Do you have any experience with lists? It would be definitely easier to store all your “answers” in a list. Then choose which answer best fits each question.

Here is an example of lists and questions that I did with my students at school. I'm at baseball now but will be home around 8pm eastern and will check back in to see how you are doing. Maybe this will help. Instead of constantly setting the same variable over and over to something else. You can just store all of your answers that you need for the project.

https://scratch.mit.edu/projects/146096874/#editor
deck26
Scratcher
1000+ posts

Multiple Answers.

What do you think this does?

setcorrectto1/1 + 1/1setcorrectto2/2 + 2/2ifanswer=correctthencodeinquestion

Do you think entering 1/1 + 1/1 will still match correct?

It won't - correct is set to one thing and then to another, not an additional one. If you want multiple answers you have to use lists.
KingMCPEx
Scratcher
14 posts

Multiple Answers.

Okay. Thanks for pointers. I'm new to major coding, so.
mstone326
Scratcher
1000+ posts

Multiple Answers.

KingMCPEx wrote:

Okay. Thanks for pointers. I'm new to major coding, so.

I just commented my list example above for you. See if that helps. In this version I didn't use variables so you will always be using the first items of the lists. After using it the script will delete that item and then use the new first item of the list.

If you didn't want to delete the items as you go I can give you an example of that as well. We'll need to make a variable. I still think the users need to be nudged to answer in a very specific way. Almost multiple choice like.

https://scratch.mit.edu/projects/146096874/#editor

Last edited by mstone326 (Feb. 28, 2017 15:17:33)

KingMCPEx
Scratcher
14 posts

Multiple Answers.

mstone326 wrote:

KingMCPEx wrote:

Okay. Thanks for pointers. I'm new to major coding, so.

I just commented my list example above for you. See if that helps. In this version I didn't use variables so you will always be using the first items of the lists. After using it the script will delete that item and then use the new first item of the list.

If you didn't want to delete the items as you go I can give you an example of that as well. We'll need to make a variable. I still think the users need to be nudged to answer in a very specific way. Almost multiple choice like.

https://scratch.mit.edu/projects/146096874/#editor

Nono, I understand the logic behind it. The list will load a list of answers for the user to use. The only reason why I used variables is due to the fact that IU copied code from a tutorial, It told me to use set correct instead of the list. But now I realize that doesn't work for multiple answers. Thanks so much.
Ninipoke
Scratcher
45 posts

Multiple Answers.

mstone326 wrote:

Do you have any experience with lists? It would be definitely easier to store all your “answers” in a list. Then choose which answer best fits each question.

Here is an example of lists and questions that I did with my students at school. I'm at baseball now but will be home around 8pm eastern and will check back in to see how you are doing. Maybe this will help. Instead of constantly setting the same variable over and over to something else. You can just store all of your answers that you need for the project.

https://scratch.mit.edu/projects/146096874/#editor
THANK YOU SO MUCH!!!! YOU ARE A GENIUS! I AM TOTALLY USING THIS!!!!!!!!!!!!!!
whenclickedsayYOU ARE AWESOMEfor2secs
addanswertolist
BearSlothCoding
Scratcher
1000+ posts

Multiple Answers.

Ninipoke wrote:

mstone326 wrote:

Do you have any experience with lists? It would be definitely easier to store all your “answers” in a list. Then choose which answer best fits each question.

Here is an example of lists and questions that I did with my students at school. I'm at baseball now but will be home around 8pm eastern and will check back in to see how you are doing. Maybe this will help. Instead of constantly setting the same variable over and over to something else. You can just store all of your answers that you need for the project.

https://scratch.mit.edu/projects/146096874/#editor
THANK YOU SO MUCH!!!! YOU ARE A GENIUS! I AM TOTALLY USING THIS!!!!!!!!!!!!!!
whenclickedsayYOU ARE AWESOMEfor2secs
addanswertolist
Please don't necropost, this is from 3 years ago.
surgenanigale
Scratcher
4 posts

Multiple Answers.

whenclickedforeverstopallsounds
surgenanigale
Scratcher
4 posts

Multiple Answers.

whenclickedifthen<penupplaysounduntildoneplaysounduntildoneplaysounduntildoneplaysounduntildoneplaysounduntildonehidelistreplaceitemoflistwiththingdefineelseend
deck26
Scratcher
1000+ posts

Multiple Answers.

surgenanigale wrote:

whenclickedforeverstopallsounds
Please don't blockspam or necropost.

Powered by DjangoBB