Python 2, 53 bytes
f=lambda n:random()*n//1or n+f(n)
from random import*
Uses the or short-circuiting idea from ArBo's answer answer. The expression random()*n//1 generates a number from 0 to n-1, with 0 taking the place of a roll of n. The or takes the that number, except if it's zero (Falsey) it continues on to n+f(n).
Python 2, 53 bytes
f=lambda n:random()*n//1or n+f(n)
from random import*
Uses the or short-circuiting idea from ArBo's answer. The expression random()*n//1 generates a number from 0 to n-1, with 0 taking the place of a roll of n. The or takes the that number, except if it's zero (Falsey) it continues on to n+f(n).
Python 2, 53 bytes
f=lambda n:random()*n//1or n+f(n)
from random import*
Uses the or short-circuiting idea from ArBo's answer. The expression random()*n//1 generates a number from 0 to n-1, with 0 taking the place of a roll of n. The or takes the that number, except if it's zero (Falsey) it continues on to n+f(n).
Python 2, 53 bytes
f=lambda n:random()*n//1or n+f(n)
from random import*
Uses the or short-circuiting idea from ArBo's answer. The expression random()*n//1 generates a number from 0 to n-1, with 0 taking the place of a roll of n. The or takes the that number, except if it's zero (Falsey) it continues on to n+f(n).