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