2022年12月1日
摘要: import sysimport pygamepygame.init()size=width,height=640,480screen=pygame.display.set_mode(size)color=(0,0,0)ball=pygame.image.load("ball3.jpg")ballr 阅读全文
posted @ 2022-12-01 20:56 tangjia俊 阅读(88) 评论(0) 推荐(0)
  2022年11月17日
摘要: def fun_bmi(person,height,weight): '''功能: 根据身高和体重计算BMI指数 person: 姓名 height: 身高 weight: 体重 ''' print(person + "的身高:" + str(height) + "米\t 体重:" + str(we 阅读全文
posted @ 2022-11-17 16:51 tangjia俊 阅读(54) 评论(0) 推荐(0)
  2022年11月10日
摘要: print("\n","="*10,"蚂蚁庄园动态","="*10)file = open('massage','w')print("\n即将显示……") print("\n","="*10,"蚂蚁庄园动态","="*10)file = open('massage.txt','w')file.wri 阅读全文
posted @ 2022-11-10 17:11 tangjia俊 阅读(24) 评论(0) 推荐(0)
  2022年11月4日
摘要: def division(): "功能,分苹果" print("\n 分苹果了 \n") apple = int(input("请输入苹果个数:")) children = int(input("请输入来了几个小朋友")) result = apple//children remain = appl 阅读全文
posted @ 2022-11-04 20:05 tangjia俊 阅读(60) 评论(0) 推荐(0)
  2022年10月25日
摘要: class Geese: "大雁类" def __init__(self,beak,wing,claw): print("我是大雁类!我有一下特征:") print(beak) print(wing) print(claw) def fly(self,state): print(state)beak 阅读全文
posted @ 2022-10-25 23:47 tangjia俊 阅读(29) 评论(0) 推荐(0)
  2022年10月24日
摘要: def funcyion_tips(): import datetime mot = ["今天星期一:\n坚持下去不是因为我很坚强,而是因为我别无选择", "今天星期二:\n含泪播种的人一定笑着收获", "今天星期三:\n做对的事情比把事情做对更重要", "今天星期四:\n命运给予我们的不是失望之酒 阅读全文
posted @ 2022-10-24 21:33 tangjia俊 阅读(13) 评论(0) 推荐(0)
  2022年10月17日
摘要: programmer_1 = '程序员甲:搞IT太辛苦了,我想换行......怎么办?'programmer_2 = '程序员乙:敲一下回车键'print(programmer_1 + '\n' + programmer_2) programmer_1 = '你知道我的生日吗'print('程序员甲 阅读全文
posted @ 2022-10-17 00:22 tangjia俊 阅读(388) 评论(0) 推荐(0)
  2022年10月12日
摘要: import datetimemot = ["今天星期一:\n坚持下去不是因为我很坚强,而是因为我别无选择。", "今天星期二:\n含泪播种的人一定能笑着收获。", "今天星期三:\n做对的事情比把事情做对重要。", "今天星期四:\n命运给予我们的不是失望之酒,而是机会之杯。", "今天星期五:\ 阅读全文
posted @ 2022-10-12 22:47 tangjia俊 阅读(414) 评论(0) 推荐(0)
  2022年9月26日
摘要: print("今有物不知其数,三三数之生剩二,五五数之剩三,七七数之剩二,问几何?\n")# 输入一个数number = int(input("请输入您认为符合条件的数:"))# 判断是否符合条件if number%3 ==2 and number%5 == 3 and number%7 == 2 阅读全文
posted @ 2022-09-26 22:54 tangjia俊 阅读(810) 评论(0) 推荐(0)
  2022年9月14日
摘要: height = 1.70print("您的身高:" + str(height))weight = 48.5print("您的体重:" + str(weight))bmi = weight/(height*height)print("您的BMI指数为:" + str(bmi))# 判断身材是否合理i 阅读全文
posted @ 2022-09-14 22:30 tangjia俊 阅读(335) 评论(0) 推荐(0)