Python 3実戦プロジェクトシリーズの一つ
2519 ワード
Python実戦事例1:インタラクティブに円面積を求める
転載先:https://www.cnblogs.com/RHadoop-Hive/p/9340341.html
# -*- coding:utf-8 -*-
import math
''' : '''
while True:
#
r = input(" :")
if not r.isalpha():
#
r = float(r)
#
ciclesArea = math.pi*r**2
print(" :" + str(ciclesArea))
print("
\t1: ;2:
")
s = input(" :")
if int(s) == 1:
continue
elif int(s) == 2:
break
else:
print(" , ")
continue
転載先:https://www.cnblogs.com/RHadoop-Hive/p/9340341.html