One . Single topic selection
( Single topic selection , 3 branch ) It is known that x = 3; y = 4, Compound assignment statement x *= y + 5 After execution ,x The value in the variable is ?
A. 23
B. 24
C. 27
D. 17
( Single topic selection , 3 branch ) If there is a string s=‘a\nb\tc.’, be len(s) The value of is ?
A. 8
B. 7
C. 6
D. 5
( Single topic selection , 3 branch ) In the following options , Do not belong to Python The characteristic is ?
A. object-oriented
B. portable
C. High operational efficiency
D. Free and open source
( Single topic selection , 3 branch ) The following Python In the sentence , Illegal ?
A. x = y = 1
B. x = (y=1)
C. x, y = y, x
D. x = 1; y = 1
( Single topic selection , 3 branch ) stay Python in , Write multiple statements on one command line , Use... Between statements ____ separate .
A. :
B. /
C. ;
D. #
( Single topic selection , 3 branch ) The following program calculates two numbers x and y Big numbers in , Which is not true ?
A. maxNum = x if x > y else y
B. maxNum = math.max(x,y)
C.
if(x>y):maxNum=x
else: maxNum=y
D.
if(y>=x):maxNum=y
maxNum = x
( Single topic selection , 3 branch ) Perform the following Python The result of the statement is :
i = 1
if(i):print(True)
else:print(False)
A. Output 1
B. Output True
C. Output False
D. Compile error
( Single topic selection , 3 branch )
The output of the following code is ?
x=2;y=2.0
if(x==y):print(“Equal”)
else:print(“Not Equal”)
A. Equal
B. Not Equal
C. Compile error
D. Runtime error
( Single topic selection , 3 branch ) In the following expression , It's not worth it 1 Yes. ?
A. 4//3
B. 15%2
C. 1^0
D. ~1
( Single topic selection , 3 branch ) The legal ones in the following identifiers are ?
A. i’m
B. _
C. 3Q
D. for
Two . Completion
expression “[3] in [1, 2, 3, 4]” The value of is ___False__.
Python The statement uses the symbol ____#___ Make a single line comment .
sentence print(‘aaa’,‘bbb’,sep=‘-’,end=‘+’) The result of the implementation of ?
aaa-bbb+
Python Use __and___,or_,__not___ To express and respectively 、 or 、 Not .
Python sentence a,b=3,4;a,b=b,a;print(a,b) The result is _4 3_____.
Python Provides object comparison operators __is and is not __ To test whether two variables point to the same object ; With built-in functions __type()__ To test the type of object ; adopt __ ==___ Operator to determine whether the value of the object pointed to by two variables is the same .
Python expression 12/4-2+5*8/4%5/2 The value of is __ 1.0 ____.
Please write out Python Statement output :print(“{:#>12s}:{:*<9.2f}”.format(“Length”,23.87501))
######Length:23.88****