Найти - Пользователи
Полная версия: Уважаемые, гуру! Нужна помощь!
Начало » Python для новичков » Уважаемые, гуру! Нужна помощь!
1
khvcool
Помогите, пожалуйста, сделать задание.


 import math 
import numpy as np
def f(x,y,c):
    m = (c**5 + (np.sin(y - c))**4) / ((np.sin(x + y))**3 + abs(x - y))
    return m
if x == math.exp(2) and y == 5.01 and c == 1.6:
    print("")
elif x == 0 and y == 0 and c == math.pi / 2:
    print("")
else:  
    N = 27
    def xi(i):
        z = 1 - (i**2 / i**0.5)
        return z
    a = np.fromfunction(xi,(N,))
    
    def yi(i):
        k = np.tan(((i - 1) / (i + 1)) * math.pi / 6)
        return k
    b = np.fromfunction(yi, (N,))
     
    def ci(i):
        l = (np.log(i**2,5) /np.log(i,2))
        return l
    g = np.fromfunction(ci, (N,))
    
    print(a)
    print(b)
    print(g)
    print("Таблица значений функции:")
    for i in a,b,c:
        print("%3.0f - %9.5f - %9.5f - %9.5f - %9.5f"%(i,xi(i),yi(i),ci(i),f(x,y,c)))
    
Вот что получилось у меня. Но оно не работает.
JOHN_16
И где тут собственно вопрос, в чем помощь нужна?
khvcool
JOHN_16
И где тут собственно вопрос, в чем помощь нужна?
Приведенный мной код не работает. Целый день бьюсь с этой задачей, но не получается реализовать ее в код.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB