10 2022 档案
摘要:实例1 def division(): print('\n 分苹果了 \n') apple=int(input('请输入苹果的个数')) children=int(input('请输入来了多少个小朋友')) result=apple//children remain=apple-result*chi
阅读全文
摘要:实例1 bmi.py def fun_bmi(person,height,weight): print(person+'的身高'+str(height)+'米\t 体重:'+str(weight)+'千克') bmi=weight/(height*height) print(person+'的BMI
阅读全文
摘要:1 class Geese: '''大雁类''' def __init__(self,beak,wing,claw): print('我是大雁类!我有以下特征:') print(beak) print(wing) print(claw) def fly(self,state): print(stat
阅读全文
摘要:1 def function_tips(): import datetime mot=["今天星期一:\n坚持下去不是因为我很坚强,而是因为我别无选择。", "今天星期二:\n含泪播种的人一定能笑着收获。", "今天星期三:\n作对的事情比把事情做对更重要。", "今天星期四:\n命运给予我们的不是
阅读全文
摘要:1 programmer_1='程序员甲:搞IT太辛苦了,我想换行.....怎么办?' programmer_2='程序员乙:敲一下回车键' print(programmer_1+'\n'+programmer_2) 2 programer_1='你知道我的生日吗?' print('程序员甲说:',
阅读全文