Advertisement
KodingKid

Python script that automatically sorts/solves random numbers

Mar 23rd, 2021
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.86 KB | None | 0 0
  1. import numpy
  2. random_numbers = [54,23,12,66,59,92,14,92,34,20,59,20,10] #you can make these numbers any random choice of numbers you want
  3. r_n = numpy.mean(random_numbers)
  4. print(r_n)
  5. #finding out the mean
  6. from scipy import stats
  7. random_numbers = [54,23,12,66,59,92,14,92,34,20,59,20,10] #you can make these numbers any random choice of numbers you want
  8. r_n = stats.mode(random_numbers)
  9. print(r_n)
  10. #finding out the number that comes up the most
  11. import numpy
  12. random_numbers = [54,23,12,66,59,92,14,92,34,20,59,20,10] #you can make these numbers any random choice of numbers you want
  13. r_n = numpy.std(random_numbers)
  14. print(r_n)
  15. #finding out standard deviation
  16. import numpy
  17. random_numbers = [54,23,12,66,59,92,14,92,34,20,59,20,10] #you can make these numbers any random choice of numbers you want
  18. r_n = numpy.var(random_numbers)
  19. print(r_n)
  20. #finding out standard variation
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement