Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # mean
- # variance
- # std
- # sum of rows, kolums and elements
- import numpy as np
- starting_list = list(map(int, input("Enter your data here: ").split(",")))
- list_one = []
- list_two = []
- list_three = []
- for x in starting_list:
- list_one.append(x)
- for q in starting_list:
- list_two.append(q)
- for z in starting_list:
- list_three.append(z)
- list_one_m = list_one[:3]
- list_two_m = list_one[3:6]
- list_three_m = list_one[6:]
- final_list = np.array((list_one_m, list_two_m, list_three_m), dtype=float)
- max_np = np.max(final_list)
- min_np = np.min(final_list)
- sum_np = np.sum(final_list)
- mean_np = np.mean(final_list)
- variance_np = np.var(final_list)
- std_np = np.std(final_list)
- print(final_list)
- print(min_np)
- print(max_np)
- print(sum_np)
- print(mean_np)
- print(variance_np)
- print(std_np)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement