Commit 70add96c by BellCodeEditor

save project

parent 6ff32ad5
Showing with 8 additions and 10 deletions
file1=open("C:\Users\Administrator\Desktop\text.txt'w'encoding='utf_8") class Hero:
file1.('小兰:12本\n') def __init__(self):
file1.('小丽:11本\n') self.hp=180
file1.('李文:9本\n') self.gongjili=300
file1.('张伟:16本\n') self.fangyuli=3
with open("C:\Users\Administrator\Desktop\text.txt'w'encoding='utf_8")as file xueshanjingying=Hero()
file1.write('小强:10本\n') print(xueshanjingying.hp)
file1.write('李明:15本\n') \ No newline at end of file
file1.close()
\ 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