A. class <name>(<type> arg1,<type> arg2,…<type> argN) B. def <name>(arg1,arg2,…argN) C. function <name>(arg1,arg2,…argN) D. def <name>(<type> arg1,<type> arg2,…<type> argN)
A. 实部和虚部都是浮点数 B. 表示复数的语法是real+image j C. 方法conjugate返回复数的共轭复数 D. 虚部必须后缀j且j不区分大小写
A. for a in range(10): time.sleep(10) B. while True: break C. while 1<10: time.sleep(10) D. a = [3,-1,','] for i in a[:]: if not a: break
A. (3,2)>(‘a’,’b’) B. 0x56 > 56 C. ‘abc’>'xyz’ D. (3,2)>(‘a’,’b’)
A. d1 = {} B. d3 = {[1,2,3]: “uestc”} C. d2 = { 3 : 5 } D. d4 = {(1,2,3): “uestc”}
A. for i in range(3): print(i) B. i = 1 while i < 3: print(i) i+=1 C. aList = [0,1,2] for i in aList: print(i+1) D. for i in range(3): print(i+1)
A. max = x > y ? x : y B. min = x if x < y else y C. while True:pass D. if(x>y) print(x)