I'm an English teacher and I want to create an online quiz which is more like a game than a paper quiz put online (e.g. HotPotatoes). I'm very handy with computers but new to scratch. I understand some of the basic concepts of programming (e.g. variables, if/then/goto, etc.).
Can you recommend a tutorial on how to make a quiz?
I found this
http://www.scratch.mit.edu/ext/youtube/?v=cFdgw6HKD9M
but it's not quite enough.
Also the "Super Hard Social Media Quiz" Scratch project shows me this can be done. Although, I am concerned that this may take so much work that I'll go back to HotPotatoes.
SHSMQ Link: http://www.google.com/url?q=http://scratch.mit.edu/projects/EtherCreeps/2307722&sa=U&ei=AYQuT9H4N-G_0QXW6emtCA&ved=0CAQQFjAA&client=internal-uds-cse&usg=AFQjCNGj4x-6gCEueirpXtzjm_B7LUAy6Q
Offline
It doesn't take much time at all! Simply use the "ask block" and the if block together to see if the answer of the quiz is right, then make the sprite say something according to the answer and maybe add to a correct-answer variable if a question is correctly answered.
One question may be:
ask [Quiz: What is 2 + 2?] and wait if <(answer) = ((2) + (2))> say [Correct!] change [correct answers v] by (1) else say [Wrong!] endDuplicate the blocks with right-clicking and then stack each script below eachother to create multitipe questions. Then place the "when green flag clicked" block above the whole script stack and then when you press the green flag, it runs.
Last edited by rdococ (2012-02-05 09:08:56)
Offline
henley wrote:
rdococ’s example is good, but instead of
((2) + (2))you could just use a four.
I noticed that too
Offline
An alternative method of showing it to your class without using the internet would be to use the presentation mode located in Scratch.
As rdococ said the main components of a quiz are ask and answer blocks.
Below is an explanation of how it works in detail, you can avoid this and go with the above solution if you understand it fine, though.
---
The ask Block
The ask block, shown below, allows you to enter a question to ask.
ask [question] and waitThe answer Block
answerComparison using the If Block
ask [What is the answer to 7 + 5?] and waitFollowing this up would be the code comparing it to the actual answer:
if <(answer) = [12]> Then Something Happens Here endThe say Block
say [That's Right!] for [2] secsThe above could be used if the answer is right.
change (score) by [1]Combining Everything
ask [What is the answer to 7 + 5?] and wait if <(answer) = [12]> say [That's Right!] for [2] secs change (score) by [1] endWhat if I want it to say something when the answer is wrong?
if <> else endAnd between the else part and the end of the block put what you want it to say:
ask [What is the answer to 7 + 5?] and wait if <(answer) = [12]> say [That's Right!] for [2] secs change (score) by [1] else say [That's Wrong!] for [2] secs endMaking a Quiz
Offline
Thanks for the help, I'm already making progress.
Another question:
If I want to present a series of questions how do I show three pictures at question 3 and then different pictures at question 4. They could be sprites (the correct answer is to click on picture 2) or just information that helps you answer the question.
Offline
Use the broadcast block.
when gf clicked wait until < (question #) = (3) > broadcast [question 3] wait until < (question #) = (4) > broadcast [question 4] wait until < (question #) = (5) > broadcast [question 5]For the first three pictures:
When I Receive [question 3] show When I Receive [question 4] hideFor the next three:
When I Receive [question 4] show When I Receive [question 5] hide
Last edited by MoreGamesNow (2012-02-05 16:38:11)
Offline
You could also store the questions and answers in lists (make sure they're the same length) and use this script:
when gf clicked set [count v] to (0) set [correct answers v] to (0) repeat (length of [questions v]) change [count v] by (1) ask (item (count) of [questions v]) and wait if <(answer)=(item (count) of [answers v])> say [That's right!] for (2) secs change [correct answers v] by (1) else say [Sorry! That's wrong.] for (2) secs end end say (join (join (join (join [Well done! You got ](correct answers))[out of])(length of [answers v]))[!])
Last edited by joefarebrother (2012-02-05 16:54:10)
Offline
webmanoffesto wrote:
Thanks for the help, I'm already making progress.
Another question:
If I want to present a series of questions how do I show three pictures at question 3 and then different pictures at question 4. They could be sprites (the correct answer is to click on picture 2) or just information that helps you answer the question.
Hmm, I'd agree with MoreGamesNow.
Split your questions using the broadcast blocks.
Main Script - Broadcast blocks
Your main script in the sprite will look something like this:
when gf clicked set (QuestionNumber) to [1] broadcast [Question1 v] wait until <(QuestionNumber) = [2]> broadcast [Question2 v] wait until <(QuestionNumber) = [3]>etc...
when I receive [Question1 v] ask [The Question] and wait if <(answer) = [The Answer]> broadcast [CorrectAnswer v] endThe Correct Answer Speaking
when I receive [CorrectAnswer v] say [That's Correct!] for [2] secsMaking Pictures Appear
when gf clicked hide stop scriptThey should also then have the script for showing the correct image for each sprite:
when I receive [Question2 v] switch to costume [Costume_that_you_want_to_show v] showAnd finally a script to hide the image after the answer is given:
when I receive [CorrectAnswer v] hide---
Offline
how do i make 1 full photos and words plz
Offline
Another thing you can do is use lists to store the questions and answers.
Questions List:
What is 2 + 2? What is 5 - 1? If Bob has 5 apples and Alice has 2 apples, how many do they have in all?
Answers List:
4 4 7
when gf clicked set [score v] to (0) set [i v] to (1) repeat <length of [questions v]> ask <item (i) of [questions v]> and wait if <(answer) = <item (i) of [answers v]>> say [You are correct!] for (2) secs change [score v] by (1) else say [You are incorrect!] for (2) secs end say <join [You have ] (score)> for (2) secs change [i v] by (1) end say <join <join [You got ] (score)> <join [ out of ] <length of [questions v]>>>You can take out all the says to keep the answers hidden. You can also easily add more questions and answers to the lists.
Offline