variable t in def random is local variable (i.e. the scope in which it is visible/exists is function random).
As j.carter said you call random() on line 4, but ypu don't assign what it return to a variable to use it later on.
As j.carter said you call random() on line 4, but ypu don't assign what it return to a variable to use it later on.