@problem@
	@problemtype@
		embedded
	@;problemtype@
	@name@
		tutorial_3_randomness_basics
	@endname@
	@preamble@
		k = randint(1,6)
		b = randint(1,6)
	@;preamble@
	@content@
		In order to ensure that exam questions (and, of curse, their answers) differ between students, variables can be assigned random values in the preamble.
		@pb;@
		In many cases, you simply want to create a random integer between (and including) 'n' and 'm', which can be achieved using the function call 'randint(n,m)'. For example, in the above preamble, the variable "k" is assigned a random integer value between 1 and 6, with equal probability for each value (similar to a dice roll).
		@pb;@
		The random numbers are newly assigned every time the file is fully processed. The result of a single processing will be referred to as an "instance" of the problem; this term will be used quite extensively thorughout the tutorials.
		@pb;@
		In particular, a value randomly assigned in the preamble will be consistent within a single instance, but might differ between different instances. In particular, the statement "@k@ = @k@" is guaranteed to be true. On the other hand, the expression @k@ = @b@ will, on average, only result in a true statement one in six times, since the random assignments for "k" and "b" are independent.
		@pb;@
		We can now pose a question which will differ between different instances:
		@lb;@
		If x/2 = @k@, then x = @numericalans(100,2*k)@.
		@lb;@
		While the (integer) answer to the above question can be entered exactly, the following question would need to be answered with a numerical approximation if 'k' is not equal to 1 or 4:
		@lb;@
		If x^2 = @k@ and x is positive, then x = @numericalans(100,sqrt(k))@.
		@pb;@
		On the other hand, the answer to the following question will again always be an integer:
		@lb;@
		If x^2 = @k*k@ and x is positive, then x = @numericalans(100,k)@.
	@;content@
@;problem@