Advertisement
maxim_shlyahtin

new_2

Apr 29th, 2023
686
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. from math import *
  2.  
  3.  
  4. def func(x):  # сама функция
  5.     return (1 - cos(x)) / exp(x)
  6.  
  7.  
  8. array = []  # массив, в котором будем хранить пары (значение, точка)
  9. for x in range(-5, 15):
  10.     array.append([func(x), x])  # добавляем все пары в массив
  11.  
  12. print("Where the lowest value is reached:", min(array)[1])
  13. print("The lowest value of the function:", min(array)[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement