Commit e5dd2e99 by BellCodeEditor

save project

parent 7fb61303
Showing with 12 additions and 12 deletions
with open(r'C:\Users\Administrator\Desktop\demo.txt','r',encoding'utf=8') as sb:
a=sb.readlines()
for i in a:
date=i.split()
sum=0
for sales in date[1:]
sum=sum+int(sales)
result=date[0]+str(sum)
print(result)
with open(r'C:\Users\Administrator\Desktop\demo.txt','a',encoding'utf=8') as sb:
file.writelines()
\ No newline at end of file
class Hero:
def __init__(self)
self.level = 1
self.hp= 300
self.attack= 20
yase=Hero()
print("yase的血量为:",yase.hp)
print("yase的攻击为:",yase.attack)
\ No newline at end of file
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