I am getting an error when I try to import anything or try to modify numpy statement to import anything other than from numpy import arange like from numpy import *, or add any other import statements.
I also can't make my radius random floats it says r = random.uniform(0,2) AttributeError: 'builtin_function_or_method' object has no attribute 'uniform'.
This is the error I get when I try to modify the import statements:
Traceback (most recent call last):
line 13, in <module>
rate(5)
TypeError: rate() missing 3 required positional arguments: 'pmt', 'pv', and 'fv'
Code:
from visual import *
from math import cos,sin,pi
from numpy import arange
from random import *
s = sphere(pos=[1,0,0],radius=0.1,color = color.red)
s0 = sphere(pos=[0,0,0],radius=0.25,color = color.green)
for i in arange(0,100,0.1):
rate(5)
theta = randint(0,30)
r = randint(-2,2)
x = cos(theta)
y = sin(theta)
s.pos = [x,y,r]