blob: f9f6a0af6d15aa78f29a8560f1e160231e286956 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# general libraries
import numpy as np
list_a = []
class spiral:
def __init__(self):
self.list_a = []
def print_list_a(self):
for value in self.list_a:
print(value)
# def gen_stars(self, n, list_a)
# define a function generating n stars
def gen_stars(n, list_a):
for i in range(0, n):
list_a.append(np.random.random((3)))
if __name__ == "__main__":
gen_stars(n)
|