Code:
temp = 0
def rand7():
global temp
temp += rand5() + 5*rand5()
return temp % 7 + 1

how about joey's solution but with a second rand5()? wouldn't the predictability be negligible then?

...
i think nvidia just wants to hear something like: you either need a conditional which will result in non predictable runtime or you have to live with some small error in the probability distribution.

the question is how much time you have to find this answer. if you have a whole day to experiment and write test programs it wouldn't be that hard.