Commit 6bd6d333 by BellCodeEditor

save project

parent 18b4ee3d
import func
a=func.new_input()
b=func.sum(a)
print('总共得了'+str(b)+'分')
\ No newline at end of file
......@@ -15,8 +15,8 @@ def sum(money):
for i in money:
b+=i
return b
c=new_input()
a=sum(c)
print('总共需要'+str(a)+'元。')
print(c)
# c=new_input()
# a=sum(c)
# print('总共需要'+str(a)+'元。')
# print(c)
\ No newline at end of file
try:
def yuan_c():
r=float(r2)
c=2*r*3.14
return c
def yuan_s():
r3=float(r2)
s=r3*r3*3.14
return s
r2=input('请输入半径(cm):')
cc=yuan_c()
ss=yuan_s()
print('周长:'+str(cc)+'cm','面积:'+str(ss)+'cm²')
except:
print('请输入整数')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment