Discuss Scratch

kfcarpenter
Scratcher
4 posts

Times Table Challenge Help

https://scratch.mit.edu/projects/263583179/

Need some help amending the code on this project. The Times Table Challenge should randomly display a multiplication 2-12 x 10. The user gets 6 seconds to answer - if correct display tick, if incorrect display cross. However, if they do not answer by 6 seconds the timer resets and a new question is offered. It's the last part that is not working.I also couldn't work out how to randomly display the numbers but only once - can live without this though.


Also, if I wanted to combine more than one table but not within a range, ie. 2,5, 10's how could I do this.

Appreciate this is probably a very simplistic way of creating the challenge but I'm a simplistic coder!

Your help and experience would be greatly appreciated.

Thanks
deck26
Scratcher
1000+ posts

Times Table Challenge Help

You presumably want to cancel the ask block which is still waiting. There are two ways to do that at the moment

- use a clone to ask the question and delete the clone
- use stop other scripts in sprite

The latter may be easiest for you if you haven't used clones before. I've done a basic remix which is incomplete but shows the idea. https://scratch.mit.edu/projects/278511067/

deck26
Scratcher
1000+ posts

Times Table Challenge Help

To avoid repeating sums you could use a list - delete the contents at the start and each time you createa sum you check to see if the list contains it. If it does you pick a different random number. Once you find a value you haven't used before you add it to the list so you can't select it again.

Not sure I understand your other question - do you mean restricting the second multiplier to 2, 5 or 10?
kfcarpenter
Scratcher
4 posts

Times Table Challenge Help

Thank you so much for your help. Just looked through your changes now.

The pupils have to learn their times tables for example; start on 10, move on to 5 then 2. They are tested on each individually to receive an initial certificate, then receive a final test on all three. The Scratch challenge helps them practice. Can't work out how to get number 2 to show “2, 5, 10”
deck26
Scratcher
1000+ posts

Times Table Challenge Help

So you mean how to get a random selection from 2, 5 and 10?

Easiest option might be to just have a list containing 2, 5 and 10 and select random 1 to 3 from the list.
kfcarpenter
Scratcher
4 posts

Times Table Challenge Help

I've made the changes. Thanks again for your help.

I made a list and was looking for the ‘item random for lists’ to add to number 2 area but cant see it?
gor-dee
Scratcher
1000+ posts

Times Table Challenge Help

kfcarpenter wrote:

I've made the changes. Thanks again for your help.

I made a list and was looking for the ‘item random for lists’ to add to number 2 area but cant see it?
It's currently not there (bug in 3.0) but you can use
(item (pick random (1) to (length of [list v] :: list)) of [list v] :: list)
kfcarpenter
Scratcher
4 posts

Times Table Challenge Help

ok thanks again.

Can't get used to the new version. Don't like that they've moved things around and changed colours on blocks. Taking me ages to even do the simplest thing.
eagleeye1000
Scratcher
0 posts

Times Table Challenge Help

Does anyone know how to make scratch generate a times tables question, (like 9 x 7) then ask the same question? I know how to make it check if the answer is right or not but to generate and then ask. I will give thanks to anyone who will help me.

Powered by DjangoBB