11 2022 档案

摘要:1.创建并打开记录蚂蚁庄园动态的文件 print("\n","="*10,"蚂蚁庄园动态","="*10)file = open('message.txt','w')print("\n 即将显示...\n")结果: 2.向蚂蚁庄园的动态文件写入一条信息 print("\n","="*10,"蚂蚁庄园 阅读全文
posted @ 2022-11-09 14:27 You·dream 阅读(65) 评论(0) 推荐(0)
摘要:1.模拟幼儿园分苹果 def division(): print(" 分苹果了 ") apple = int(input("请输入苹果的个数:")) children = int(input("请输入来了几个小朋友:")) result = apple//children remain = appl 阅读全文
posted @ 2022-11-03 09:50 You·dream 阅读(29) 评论(0) 推荐(0)