I created a while loop that's random each time I run it and I need to save all the values of x and y as arrays. I don't know how to do this because their values are different each time I run the code. This is what I have so far
import numpy as np
x = 5
y = 5
while True:
a = np.random.rand(1)
print x
if a < .5:
x = x + 1
y = y - 1
print x
print y
if a > .5:
y = y + 1
x = x - 1
print x
print y
if x == 0:
print x
break
if y == 0:
print y
break
list.append()method?a == 0.5?