Answer the question
In order to leave comments, you need to log in
Python arithmetic expression how to do?
The program calculates the given arithmetic value, given the given variables.
Gives an error message.
import math
x=float(input("Введите переменуую X:"))
z=float(input("Введите переменуую Z:"))
y=math.atan((x+y)/(math.pi*sin(y)))+math.pow(math.e,4*x)/(x*z)
print("y = {0:.2f}".format(y))
Answer the question
In order to leave comments, you need to log in
NameError: name 'y' is not defined
y=math.atan((x+y)/(math.pi*sin(y)))+math.pow(math.e,4*x)/(x*z )
You assign the variable "y=" to this value "math.atan((x+y)/(math.pi*sin(y)))+math.pow(math.e,4*x)/(x* z)" , however, to calculate the value, you need the variable "y" in it, and there is no such variable yet.
Or an error in the expression:
Or you need to immediately remove the "Y" on the right side of the expression and then calculate.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question