mitmath/computational-thinking

hw1 Ex3.5 noisify test

ubdbra001 opened this issue · 0 comments

Hi,

Just wanted to let you know that the test for the answer to Ex 3.5 in Hw1 doesn't appear to be working properly. I get a correct answer for the following (obviously wrong) code:

function noisify(x::Number, s)
	rand_num = rand()
	noisy_num = x + rand_num
	noisy_num = clamp(noisy_num, 0., 1.)
	return noisy_num
end

Afraid I'm not not sure how to fix it though.