摘要: 1.创建计算BMI指数的模块 def dun_bmi(person,height,weight):print(person + "的身高" + str(height) + "米\t 体重:" + str(weight) + "千克" )bmi = weight / (height * height) 阅读全文
posted @ 2022-12-08 14:01 pikapikapika 阅读(41) 评论(0) 推荐(0)
摘要: 1.创建并打开记录蚂蚁庄园动态的文件 print("\n","="*10,"蚂蚁庄园动态","="*10)file = open('message.txt','w')print("\n即将显示\n") 2.向蚂蚁庄园的动态文件写入一条信息 print("\n","="*10,"蚂蚁庄园动态","=" 阅读全文
posted @ 2022-12-08 14:00 pikapikapika 阅读(51) 评论(0) 推荐(0)