def act(actor): #定义函数 print(actor+"开始参演这个剧本") A = input("导演选定的角色是:") act(A) #调用函数
def taocan(a,b,c,d,e,f): print('米线店套餐如下:1.'+ a + '2.' + c + '3.' +e) print(a+b) print(c+d) print(e+f) taocan('考神套餐','13元','单人套餐','9.9元','情侣套餐','20元')
# 星座 m = ('摩羯座','水瓶座','双鱼座','白羊座','金牛座','双子座', '巨蟹座','狮子座','处女座','天秤座','天蝎座','射手座','摩羯座') # 日期 d = (20,19,21,20,21,22,23,23,23,24,23,22) def xingzuo(month,day): if day < d[month-1]: return m[month-1] else: return m[month] M = int(input("请输入月份:")) D = int(input("请输入日期:")) print(str(M)+"月"+str(D)+"日星座为:"+xingzuo(M,D))
def change(dollar): RMB = dollar * 6.28 return RMB dollar = float(input("请输入要转换的美元金额:")) print("转换后人民币金额是:" , change(dollar))
标签:实战,23,dollar,month,print,第六章,input,def From: https://www.cnblogs.com/xsj666/p/16967044.html