The list "inside" is supposed to output a series of "True" and "False" But it outputs "None" instead for all 10 values
import random
import math
random.seed(1)
def rand():
number = random.uniform(-1,1)
return number
print(rand())
def distance(x, y):
for a,b in x,y:
ans = math.sqrt((x[0] - y[0])**2 + (x[1] - y[1])**2)
return ans
print(distance((0, 0), (1, 1)))
def in_circle(x, origin=(0,0)):
print(distance(x, origin) <1)
print(in_circle((1,1))) # this is supposed to print only "false" but it prints "False" and "None"
R = 10
inside = [in_circle((rand(), rand())) for i in range(R)]
print(inside[:3])
Please help!