网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

c=[1]deffore():c.append(2)fore()print(c)输出结果是()

  • A、[1,2]
  • B、[1,2,3]
  • C、[1,2,3,4]
  • D、程序异常

参考答案

更多 “c=[1]deffore():c.append(2)fore()print(c)输出结果是()A、[1,2]B、[1,2,3]C、[1,2,3,4]D、程序异常” 相关考题
考题 有以下程序: 程序运行后的输出结果是( )。 A.3,3,3B.2,2,3C.1,2,3 有以下程序:程序运行后的输出结果是( )。A.3,3,3B.2,2,3C.1,2,3D.1,l,3

考题 若有以下程序段: int r=8; print("%d\n",r1): 输出结果是( )。 A.16B.8S 若有以下程序段: int r=8; print("%d\n",r1): 输出结果是( )。A.16B.8C.4D.2

考题 有如下程序: include using namespace std; class TestClass { private: int x,y; pu 有如下程序: #include<iostream> using namespace std; class TestClass { private: int x,y; public: TestClass (int i,int j) { x=i; y=j; } void print() { cout<<"print1"<<end1; } void print()const { cout<<"print2"<<end1; } }; int main() { const TestClass a(1,2); a.print(); return 0; } 该程序运行后的输出结果是( )。A.print1B.print2C.print1 print2D.程序编译时出错

考题 有以下程序程序运行后的输出结果是( )。A.3,3,3B.2,2,3C.1,2,3D.1,1,3

考题 下述程序的输出结果是( )。A)2,2B)1,1C)3,4D)1,2

考题 有如下程序: #includediostream usingnamespacestd; classTestClass {private: intX,y; public: TestClass(inti,intj) {x=i; y=j;} voidprint() {cout"printl"endl;} voidprint()const {cout"print2"endl;}}; intmain() {constTestClassa(1,2); print(); return0;} 该程序运行后的输出结果是( )。A.printlB.print2C.printlprint2D.程序编译时出错

考题 有以下程序#includestdio.hstruct ord{int x,y;} dt[2]={1,2,3,4};main(){struct ord*p=dt;printf(“%d,”,++(p一x));printf(“%d\n”,++(p一y));}程序运行后的输出结果是A.1,2B.4,1C.3,4D.2.3

考题 有以下程序: #includestdio.h struct ord {int X,y;)dt[2]={1,2,3,4}; main( ) { struct ord*p=dt; printf("%d,",++(p-x));printf("%d\n",++(p-y)); } 程序运行后的输出结果是( )。A.1,2B.4,1C.3,4D.2,3

考题 若有以下程序则程序的输出结果是A.2,2,2,4B.2,1,2,-1C.5,1,2,-1D.1,2,3,4

考题 有如下程序:#includediostreamusingnamespacestd;classTestClass{private:intX,y;public:TestClass(inti,intj){x=i;y=j;}voidprint(){coutprintlendl;}voidprint()const{coutprint2endl;}};intmain(){constTestClassa(1,2);print();return0;}该程序运行后的输出结果是( )。A.printlB.print2C.printlprint2D.程序编译时出错

考题 print(set([1,2,3]))输出结果为: A.set([1,2,3])B.([1,2,3])C.{1,2,3}D.[1,2,3]

考题 (37)有以下程序#include stdio.hstruct ord{ int x,y;}dt[2]={1,2,3,4};main(){struct ord *p=dt;printf("%d,",++(p-x)); printf("%d\n",++(p-y));}程序运行后的输出结果是A)1,2B)4,1C)3,4D)2,3

考题 飞行中危险天气咨询服务包括:1)SIGMET;2)对流性SIGMET;3)AIRMET;4)PIREPS:().A、1,2B、1,2,3C、1,2,3,4

考题 print(list(enumerate([1,2])))输出结果为:()A、[[0,1],[1,2]]B、[(0,1),(1,2)]C、[1,2]D、[0,1,1,2]

考题 print({1,2,3}-{3,4,6})输出结果为:()A、{-2,-2,-3}B、{2,2,3}C、{1,2}D、报错

考题 (1,2,3).append(4) 输出结果为:()A、(1,2,3,4)B、(1,2,3)C、(4,1,2,3)D、报错

考题 print(list(zip([1,2],[3,4])))输出结果为:()A、[1,2,3,4]B、[(1,2),(3,4)]C、[(1,3),(2,4)]D、报错

考题 已知x=(0,1,2,3),那么执行语句x.add(4)之后,x的值为()A、{1,2,3}B、{1,2,3,4}C、{1,2}D、AttributeError

考题 a=10ifa==10:print(a-10)else:print[a]程序的输出结果是()。A、0B、10C、-10D、程序异常

考题 飞行中危险天气咨询服务包括:().1)SIGMET;2)对流性SIGMET;3)AIRMET;4)PIREPS:A、1,2B、1,2,3C、1,2,3,4D、1,2,4

考题 单选题c=[1]deffore():c.append(2)fore()print(c)输出结果是()A [1,2]B [1,2,3]C [1,2,3,4]D 程序异常

考题 单选题a=10ifa==10:print(a-10)else:print[a]程序的输出结果是()。A 0B 10C -10D 程序异常

考题 单选题(1,2,3).append(4) 输出结果为:()A (1,2,3,4)B (1,2,3)C (4,1,2,3)D 报错

考题 单选题print(list(enumerate([1,2])))输出结果为:()A [[0,1],[1,2]]B [(0,1),(1,2)]C [1,2]D [0,1,1,2]

考题 单选题print(list(zip([1,2],[3,4])))输出结果为:()A [1,2,3,4]B [(1,2),(3,4)]C [(1,3),(2,4)]D 报错

考题 单选题已知集合A={1,2,3,4},B={x|-1<x<3},则A∩B=(  ).A {0,1,2}B {1,2}C {1,2,3}D {1,0,1,2}

考题 单选题print({1,2,3}-{3,4,6})输出结果为:()A {-2,-2,-3}B {2,2,3}C {1,2}D 报错