예제 #1
0
 def spawnMoons(l, j):
     for i in range(j):
         r = self.r / (j*2)
         d = math.rand(50,150)
         v = math.rand(-0.1,0.1)
         self.moons[i] = Planet(r, d/j, v)
         if j < 3:
             self.moons[i].spawnMoons(3, j+1)
예제 #2
0
import math

n = 10
print(n)
for i in range(0, n):
    print(math.rand(-10, 20))
예제 #3
0
def myRand():
    return math.rand() / sys.maxsize.__rand__()
# In[2]:

from math import rand

# In[3]:

help(read)

# In[4]:

import random

# In[5]:

x = rand(200)

# In[6]:

x = random.random(200)

# In[7]:

x = array([i for i in range(1, 50)])

# In[8]:

from numpy import *

# In[9]: