I have two scripts main.py
and get_number.py
. The script get_number.py
returns a random number whenver it's called. I want to call this script from main.py
and print all these returned values. In other words, the script get_number.py
is the following:
def get_random():
return np.random.uniform(0,1)
Now I have the following code in main.py
import get_number
n_call = 4
values = np.zeros(n_call)
for i in range(n_call):
values[i]= get_number.get_random()
print(values)
However I am receiving the error that No module named get_number
. How would I go about accomplishing this task?