環境
CentOS7.4
python3.5.0
import math a = (1 / math.sqrt(5))(math.sqrt(5)/2) print(a)
1/√5 x √5/2 = 1/2
これをやりたいのですが、上記コードを実行すると
Traceback (most recent call last): File "squared", line 4, in <module> a = (1 / math.sqrt(5))(math.sqrt(5)/2) TypeError: 'float' object is not callable
このような結果となり、1/2(答え)が得られません。
pythonでルートの計算を行うためにはどのような準備が必要なのでしょうか?

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/02/13 01:29