万博体育app:“运行以下程序,输出结果为: tup=([1,2] , [4,3] , [6,5] , [7,8] ) lst=[ sum(i) for i in tup if i[0]>i[1] ] print(ls…”相关的问题
第1题
运行以下程序,输出结果为: lst=[1,2,3,4,5] for i in lst: i*=2 print(lst[3])
点击查看答案
第2题
运行以下程序,输出结果为: lst1=[70,80,93,88,90] lst2=[i for i in lst1 if i>90] print(lst2)
点击查看答案
第3题
运行以下程序,输出结果为: lst1=[1,2,3,4,5] lst2=[] for i in lst1: lst2.insert(0,i) print(lst2[-1])
点击查看答案
第4题
运行以下程序,输出结果为: lst1=[1,2,3,4,5] lst2=[] for i in lst1: lst2=[i]+lst2 print(lst1[0]+lst2[0])
点击查看答案
第5题
运行以下程序,输出结果为: lst1=['a','b','c','d','e'] lst2=[i.upper()+'1' for i in lst1] print(lst2[2])
点击查看答案
第6题
运行以下程序,输出结果为: lst=[ '1' , int('1') , eval('1') , (1) ] s=set(lst) print(len(s))
点击查看答案
第7题
运行以下程序,输出结果为: lst=[1,2,3,4,3,2,5,1,3] n=lst.count(3) for i in range(0,n): lst.remove(3) print(lst[3])
点击查看答案
第8题
运行以下程序,输出结果为: a=(('小梅','女','1999-1-10'),('小红',20,'2000-10-3'),('小林',18,'1999-2-6')) print(a[1][2][-3])
点击查看答案
第9题
运行以下程序,输出结果为: lst1=[1,2,3,4,5] lst2=[3,4,5,6,7] s=0 for i in lst1: if i in lst2: s+=i print(s)
点击查看答案
第10题
以下内容在同一个源程序中: class A { int a; A(int a) { this.a=a; } int add() { return a+10; } } class TestA { public static void f(A t) { System.out.println(t.add()); } public static void main(String[] args) { f(new A() { int add() { return a+20; } } ); } } 则
A.程序的运行结果为输出0
B.程序的运行结果为输出10
C.程序的运行结果为输出20
D.程序不能编译通过
点击查看答案
第11题
以下程序运行结果为: a=4 if a>3: b=a**2 else: b=a**3 print(b)
点击查看答案