Advertisement
maxim_shlyahtin

2-4

Apr 28th, 2023 (edited)
810
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. from math import *
  2. #2
  3.  
  4. print(min(list(zip(map(lambda x: (10 - 2 * exp(x))/(sin(x) + 1), range(-10, 11)), range(-10, 11))))[1])
  5.  
  6. #3
  7.  
  8. with open("text_3_1.txt") as file:
  9.     s = file.readlines()
  10.     print(*list(int(i) for i in s if int(i) % 2 == 1), sep=', ')
  11.  
  12. #4
  13.  
  14. with open("test_4_1.txt") as file:
  15.     s = file.readline().split()
  16.     print("Различных слов: ", len(set(s)))
  17.     print(sorted(set(s)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement