Commit c92c59ad by BellCodeEditor

save project

parent c05018cb
Showing with 12 additions and 8 deletions
import turtle
pen=turtle.Pen()
pen.write("我是中国人",font=('楷体',70,"normal"))
\ No newline at end of file
def new_input():
g=[]
a=0
while True:
unit= input("请问你想点什么菜")
unit= input("请输入数字")
if unit== "p":
break
else:
g.append(unit)
\ No newline at end of file
try:
b=int(unit)
except:
print("请输入数字")
else:
a=a+b
#print(a)
return a
c=new_input()
print(c)
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