12
Atsushi Kanaya
http://todoa2c.github.io/
Last seen 4 years ago
Member for 10 years, 2 months, 18 days
Difficulty Normal
if number % 3 == 0:
if number %3 == 0 and number % 5 == 0:
This first condition ↑ is unnecessary.
More
LGTM
I like l//2 better than int(l/2) if it runs this on Python 3 only, but no problem.
More
外心を求めれば良いのですね。勉強になります。
結果の出力部分は、下記のように書けば今回の問題は良いそうです。私も知りませんでした。
return "(x-%.3g)^2+(y-%.3g)^2=%.3g^2" % (c.real, c.imag, r)
この辺が参考になります。
http://docs.python.jp/3/library/stdtypes.html#old-string-formatting (tanakhさんが使われた方)
http://docs.python.jp/3/library/string.html#formatstrin
More