python基礎(chǔ)知識練習(xí)題(14)
1. 姓名:_________
1、以下程序的運(yùn)行結(jié)果為:()?
a=8
b=3
print(a%b)
A、2
B、3
C、1
D、4
2、以下程序的運(yùn)行結(jié)果為:()?
a=8
b=3
print(a//b)
A、1
B、2
C、3
D、4
3、以下程序的運(yùn)行結(jié)果為:()?
a=8
b=3
print(a**b)
A、64
B、9
C、27
D、512
4、以下程序的運(yùn)行結(jié)果為:()?
a=1
b=3
print(a>=b)
A、a>=b
B、3>=1
C、True
D、False
5、以下程序的運(yùn)行結(jié)果為:()?
a=2
b=3
c=1
print(a<b and c>b)
A、True
B、a<b and c>b
C、False
D、2<3 and 1>3
6、以下程序的運(yùn)行結(jié)果為:()?
a=4
b=3
c=1
print(a<b or c>b)
A、True
B、a<b and c>b
C、False
D、”a<b and c>b”
7、以下程序的運(yùn)行結(jié)果為:()?
a=21
b=10
c=0
c+=a
print(c)
A、21
B、0
C、10
D、31
8、以下程序的運(yùn)行結(jié)果為:()?
a=21
b=10
c=0
c=a+b
c+=a
print(c)
A、21
B、31
C、52
D、0
9、以下程序的運(yùn)行結(jié)果為:()?
a=21
b=10
c=0
c=a+b
c*=a
print(c)
A、31
B、651
C、52
D、21
10、變量a的數(shù)據(jù)類型是什么()?
a=float(input("請輸入一個數(shù):"))
A、整型
B、浮點(diǎn)型
C、字符串
D、布爾類型
11、如果用戶輸入數(shù)據(jù)a的值為4,b的值為5,下面這段程序的運(yùn)行結(jié)果為()?
a=int(input(“請輸入第一個數(shù):”))
b=int(input(“請輸入第一個數(shù):”))
c=a+b
print(c)
A、4
B、5
C、1
D、9
關(guān)閉
更多問卷
復(fù)制此問卷