Advertisement
angelstoev

Untitled

Oct 26th, 2022
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.76 KB | None | 0 0
  1. # mean
  2. # variance
  3. # std
  4.  
  5.  
  6. # sum of rows, kolums and elements
  7. import numpy as np
  8.  
  9. starting_list = list(map(int, input("Enter your data here: ").split(",")))
  10. list_one = []
  11. list_two = []
  12. list_three = []
  13. for x in starting_list:
  14.     list_one.append(x)
  15. for q in starting_list:
  16.     list_two.append(q)
  17. for z in starting_list:
  18.     list_three.append(z)
  19. list_one_m = list_one[:3]
  20. list_two_m = list_one[3:6]
  21. list_three_m = list_one[6:]
  22. final_list = np.array((list_one_m, list_two_m, list_three_m), dtype=float)
  23. max_np = np.max(final_list)
  24. min_np = np.min(final_list)
  25. sum_np = np.sum(final_list)
  26. mean_np = np.mean(final_list)
  27. variance_np = np.var(final_list)
  28. std_np = np.std(final_list)
  29. print(final_list)
  30. print(min_np)
  31. print(max_np)
  32. print(sum_np)
  33. print(mean_np)
  34. print(variance_np)
  35. print(std_np)
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement