Commit 5d00f40c by BellCodeEditor

save project

parent 23e7e554
Showing with 12 additions and 20 deletions
def new_input():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
total.append(unit)
new_input
\ No newline at end of file
a=open(r'C:\Users\Administrator\Desktop\test.txt','w',encoding='utf-8')
a.write('王宇圳:12本,王儿童:12本,王肌肤:12本,王卡图:12本')
a.close()
\ No newline at end of file
a=open(r'C:\Users\Administrator\Desktop\test.txt','w',encoding='utf-8')
a.write('王宇圳:12本,王儿童:12本,王肌肤:12本,王卡图:12本')
a.close()
\ No newline at end of file
try:
a=int(input("输入年龄"))
except:
print("请输入数字")
else:
if a < 18:
print("不能喝酒哦")
else:
print("可以喝酒")
\ No newline at end of file
a=open(r'C:\Users\Administrator\Desktop\test.txt','w',encoding='utf-8')
a.write('王宇圳:12本,王儿童:12本,王肌肤:12本,王卡图:12本')
a.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