// I want 'b' to equal 12

(

b = a + 5;

)


// why doesn't this work?

(

var test;

test = 10;

("The value of test is: " ++ test).postln;

test = 20

("The new value of test is: " ++ test).postln;

)


(

var a, product, mulAdd, result;


a = 15;


product = a * b; 

"The result of the product is: ".post;

product.postln;

"BUT - it should equal 45... if it doesn't, what do you need to do? And why wasn't it in the first place?".postln;


mulAdd = {arg initVal, mulVal, addVal;

addVal + initVal * mulVal;

};


result = muladd.value(10, 10, 10);


"I want my result to equal 110... it equals: ".post;

result.posltn;


// below is a logic statement... we'll learn more about these later, but for now, you should know

// that the 'test' checks to see if result does NOT equal 110... if it doesn't, it posts a 

// warning, telling you to fix your mulAdd function


(result != 110).if({

"Change the mulAdd function to give the correct result using parens!".warn;

});


)