Axeer

pz3_1.py

Oct 19th, 2021
954
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import random as r
  2. import math as m
  3.  
  4. max_nums = 200
  5. arr_more_zero = []
  6. arr_less_zero = []
  7. for i in range(0, max_nums): # Будет сгенерено max_nums значений от -1 до +1
  8.     arr_more_zero.append(m.cos(m.radians(m.degrees(r.randint(0, 360)))))
  9.  
  10. arr_more_zero.sort(reverse=True)
  11. arr_less_zero = [i for i in arr_more_zero if i < 0]
  12. arr_more_zero = [i for i in arr_more_zero if i > 0]
  13.  
  14. for result,p_result in zip(arr_less_zero,arr_more_zero): print(f'{result:3.2f}{p_result:20.2f}')
  15. input('kanec...')
RAW Paste Data