Commit ee94486b by BellCodeEditor

save project

parent cde8889d
Showing with 174 additions and 14 deletions
......@@ -13,5 +13,93 @@ def new_input():
total.append(unit)
finally:
print("-"*30)
print(total)
new_input()
\ No newline at end of file
return total
abc = new_input()
sum_a = 0
for i in abc:
sum_a=sum_a+i
print(sum_a)
total=[]
def dsh():
while True:
unit=input("请输入:")
if unit=='q':
break
else:
total.append(unit)
dsh()
print(total)
class hero:
def_init_(self):
self.level=1
self.hp=300
self.attack=20
yase=Hero()
print(yase.level)
print("yase的血量值为:",yase.hp)
print("yase的攻击力为:",yase.attack)
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