29 lines
691 B
Python
29 lines
691 B
Python
import numpy as np
|
|
|
|
bins = [" 0-9: ","10-19: ","20-29: ","30-39: ","40-49: ","50-59: ","60-69: ","70-79: ","80-89: ","90-99: "]
|
|
|
|
def get_distribution():
|
|
# Generate normal distribution (mean_value, standard_deviation, size)
|
|
exam_points = np.random.normal(60, 20, 67)
|
|
# round to integer datatype
|
|
exam_points = np.rint(exam_points).astype(int)
|
|
# clip values between 15 and 95
|
|
exam_points = np.clip(exam_points, 15, 95)
|
|
|
|
for points in exam_points:
|
|
pass
|
|
|
|
return exam_points
|
|
|
|
def generate_arr():
|
|
arr = np.ndarray((10,10), dtype=object)
|
|
|
|
for pos in range (10):
|
|
arr[(pos,0)] = bins[pos]
|
|
|
|
print(arr)
|
|
|
|
def main():
|
|
generate_arr()
|
|
|
|
main() |