Commit 3f04d689 by BellCodeEditor

auto save

parent 024fb164
Showing with 46 additions and 1 deletions
score = int(input('输入得分:'))
if score < 60:
print('不及格')
elif score < 80:
print('合格')
elif score < 90:
print('良好')
else:
print('优秀')
\ No newline at end of file
def new_input():
total = []
while True:
unit=input('请输入(q退出):')
if unit=='q':
break
else:
try:
unit = int(unit)
except:
print("请重新输入一个数字")
else:
total.append(unit)
finally:
print("-"*30)
return total
def sum(money):
count = 0
for i in money:
count = count + i
return count
result = new_input()
pay = sum(price)
print("您一共消费了" + str(pay) +"元")
\ No newline at end of file
total = [] def new_input():
total = []
while True: while True:
unit= input("请输入:") unit= input("请输入:")
if unit== 'q': if unit== 'q':
......
import turtle
t = turtle.Turtle()
for i in range(5):
t.color('green')
t.forward(100)
t.left(144)
t.forward(100)
t.left(144)
t.forward(150)
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