The standard view of this forum does not always work well with assistive technology. We also provide a simpler view, which still contains all features. Switch to simple view.

Albert Gomez Post 1

25 June 2016, 6:11 AM

Simple sums

Dear Tim,

Using the Variable Numeric Set question type, I'm trying to create sums of whole numbers whose total does not exceed, say, 20. That is, the answer a must be an integer between 0 and 20. The answer is therefore defined as

a = rand_int(0,20)

The summands are defined as 

b = rand_int(0,a) 

and 

c = a - b

(These are presented to the learners in the Question Text box as [[b]] + [[c]] = ________.)

However, an error message appears on clicking on Recalculate Now. This must be a bug, mustn't it? Because everything works beautifully when the variable a is slightly changed to 

a = rand_int(1,20)

(The latter formula has the slight disadvantage of ruling out the possibility of ever having a = 0.)

Is this a bug? If so, can it be fixed?

Best wishes,

Al

Adrian Bickers Post 2 (summarised) in reply to 1

27 June 2016, 12:47 PM
Thanks for alerting us to this Al. I've have been able to replicate this. The...
 [Expand all posts]