题目内容

写出下面程序的运行结果。s1={1,2,3}s2=set([2,3,3,4])s1.add(3)s2.update('ab')s3=s1.intersection(s2)s4=s1.union(s2)s5=s1.difference(s2)s6=s1.symmetric_difference(s2)print(s1)print(s2)print(s3)print(s4)print(s5)print(s6)

查看答案
更多问题

写出下面程序的运行结果。d1={'name':"zhangsan",'sno':"001",'score':99}d2=dict().fromkeys(['radius','height'],0)print(d1)print(d2)d1.update({'age':19})d2.update(radius=10)print(d1)print(d2)del d1['age']height=d2.pop('height','not found')print(d1)print(d2)print(height)print(len(d1))print(len(d2))

写出下面程序的运行结果。s1=[1,2,3,4,5,6,7,8,9,10]s2=list(range(10,20))s3=s1[2:8:2]s4=s2[-8::-2]print(s1)print(s2)print(s3)print(s4)

写出下列程序的运行结果:class Student:def __init__(self,sno,name):self.sno=snoself.name=namedef __str__(self):return '学号:'+self.sno+',姓名:'+self.nameif __name__=='__main__':ls1=[23,56,12,37,28]ls1.sort()print(ls1)ls1.sort(reverse=True)print(ls1)ls2=[Student('1810101','李晓明'), Student('1810100','马红'),Student('1810102','张刚')]ls2.sort(key=lambda stu:stu.sno)for stu in ls2:print(stu)ls2.sort(key=lambda stu:stu.sno, reverse=True)for stu in ls2:print(stu)

瞳孔扩大包括以下哪些原因?

A. 毛果芸香碱过量
B. 阿托品过量
C. 桥脑出血
D. 外伤
E. 青光眼绝对期

答案查题题库