0

Python error

I inputted codes then it always resulted to: Type error: float object is not callable What should i do

12th Feb 2020, 1:29 AM
Amolap
Amolap - avatar
8 ответов
+ 1
Please show us that code, then we'll take a look!
12th Feb 2020, 1:31 AM
HonFu
HonFu - avatar
+ 1
Before pow an operator is missing.
12th Feb 2020, 1:57 AM
HonFu
HonFu - avatar
+ 1
pow(2, 2) means 2^2 and therefore becomes 4. c = x * (1 + (y / z)) (z*x)^1 Do you see now, how something's missing?
12th Feb 2020, 2:04 AM
HonFu
HonFu - avatar
0
#Get the value of c import math x = float(input("Kindly enter the value of x:")) y = float(input("Kindly enter the value of y:")) z = float(input("Kindly enter the value of z:")) c = x * (1 + (y / z)) pow(z * x, 1) print("The value of c is:", c)
12th Feb 2020, 1:52 AM
Amolap
Amolap - avatar
0
the test data x = 1.2 y = 3.5 z = 4.2
12th Feb 2020, 1:53 AM
Amolap
Amolap - avatar
0
what operator huhu :( the equation is x ( 1+ y/z) raise to (z(x))
12th Feb 2020, 1:59 AM
Amolap
Amolap - avatar
0
oh my, it should be x * pow (1+ (y/z)), z*x) am i right? but the value resulted is different from the calculator. python: 25.4634 calculator: 25.9234
12th Feb 2020, 2:12 AM
Amolap
Amolap - avatar
0
joke its okay now
12th Feb 2020, 2:14 AM
Amolap
Amolap - avatar