python程序设计智慧树答案
@景罗3328:python编程 -
蓟良13183588762…… class party(object): def __init__(self): self.l=['friends'] def str_input(self): while True: friends=input() self.l.append(friends) if friends=='#': break print(self.l) def know_name(self,name): n=len(self.l) if name in self.l or name in ['friends','#']: for i in ...
@景罗3328:python程序设计 -
蓟良13183588762…… import mathdef qiugen(a,b,c): if a == 0: return “A不能为0” delta = math.pow(b,2) - 4*a*c#(pow=b*b) if delta return '无实根' x1= (math.sqrt(delta)-b)/(2*a) x2=-(math.sqrt(delta)+b)/(2*a) return x1,x2#请给出方程的a,b,c,例如2,3,4qiugen(2,3,4)#print(qiugen(2,3,4))#无实根
@景罗3328:python入门程序设计作业 -
蓟良13183588762…… coinprice={"1分":1,"2分":2,"5分":5,"1角":10,"2角":20,"5角":50} coins=["5角","2角","1角","5分","2分","1分"] price=float(raw_input("请输入物品价格(元):")) if price>1 or price <0: print "价格输...
蓟良13183588762…… class party(object): def __init__(self): self.l=['friends'] def str_input(self): while True: friends=input() self.l.append(friends) if friends=='#': break print(self.l) def know_name(self,name): n=len(self.l) if name in self.l or name in ['friends','#']: for i in ...
@景罗3328:python程序设计 -
蓟良13183588762…… import mathdef qiugen(a,b,c): if a == 0: return “A不能为0” delta = math.pow(b,2) - 4*a*c#(pow=b*b) if delta return '无实根' x1= (math.sqrt(delta)-b)/(2*a) x2=-(math.sqrt(delta)+b)/(2*a) return x1,x2#请给出方程的a,b,c,例如2,3,4qiugen(2,3,4)#print(qiugen(2,3,4))#无实根
@景罗3328:python入门程序设计作业 -
蓟良13183588762…… coinprice={"1分":1,"2分":2,"5分":5,"1角":10,"2角":20,"5角":50} coins=["5角","2角","1角","5分","2分","1分"] price=float(raw_input("请输入物品价格(元):")) if price>1 or price <0: print "价格输...