




版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
1、精選文檔一,中文單項選擇題(30分,每個3分)· 1下列哪個語句在Python中是非法的? A、x = y = z = 1 B、x = (y = z + 1) C、x, y = y, x D、x += y · 2關于Python內(nèi)存管理,下列說法錯誤的是 A、變量不必事先聲明 B、變量無須先創(chuàng)建和賦值而直接使用 C、變量無須指定類型 D、可以使用del釋放資源 · 3、下面哪個不是Python合法的標識符 A、int32 B、40XL C、self D、name · 4、下列哪種說法是錯誤的 A、除字典類型外,全部標準對象均可以用于布爾測試 B、空字符串
2、的布爾值是False C、空列表對象的布爾值是False D、值為0的任何數(shù)字對象的布爾值是False · 5、下列表達式的值為True的是 A、5+4j > 2-3j B、3>2>2 C、(3,2)< ('a','b') D、abc > xyz · 6、Python不支持的數(shù)據(jù)類型有 A、char B、int C、float D、list · 7、關于Python中的復數(shù),下列說法錯誤的是 A、表示復數(shù)的語法是real + image j B、實部和虛部都是浮點數(shù) C、虛部必需后綴j,且必需是小寫 D
3、、方法conjugate返回復數(shù)的共軛復數(shù) · 8、關于字符串下列說法錯誤的是 A、字符應當視為長度為1的字符串 B、字符串以0標志字符串的結束 C、既可以用單引號,也可以用雙引號創(chuàng)建字符串 D、在三引號字符串中可以包含換行回車等特殊字符 · 9、以下不能創(chuàng)建一個字典的語句是 A、dict1 = B、dict2 = 3 : 5 C、dict3 = 1,2,3: “uestc” D、dict4 = (1,2,3): “uestc” · 10、下列Python語句正確的是 A、min = x if x < y = y B、max = x > y ? x :
4、 y C、if (x > y) print x D、while True : pass 二,英文單項選擇題(30分)· 1.what gets printed? Assuming python version 2.x() print type(1/2) A.<type 'int'> B.<type 'number'> C.<type 'float'> D.<type 'double'> E.<type 'tuple'> · 2.
5、What gets printed?() nums = set(1,1,2,3,3,3,4)print len(nums)A.1 B.2 C.4 D.5 E.7 · 3. What gets printed?() · counter = 1 ·· def doLotsOfStuff():· · global counter·· for i in (1, 2, 3): · counter += 1·· doLotsOfStuff()·· print counterA.
6、1 B.3 C.4 D.7 E.none of the above · 4. What gets printed?() print r"nwoow"A.new line then the string: woow B.the text exactly like this: r"nwoow" C.the text like exactly like this: nwoow D.the letter r and then newline then the text: woow E.the letter r then the text like th
7、is: nwoow · 5. Which numbers are printed?() for i in range(2): print ifor i in range(4,6): print iA.2, 4, 6 B.0, 1, 2, 4, 5, 6 C.0, 1, 4, 5 D.0, 1, 4, 5, 6, 7, 8, 9 E.1, 2, 4, 5, 6 · 6. What gets printed by the code snippet below?() import mathprint math.floor(5.5)A.5 B.5.0 C.5.5 D.6 E.6.0
8、 · 7. Assuming the filename for the code below is /usr/lib/python/person.py and the program is run as: python /usr/lib/python/person.py What gets printed?() class Person: def _init_(self): pass def getAge(self): print _name_p = Person()p.getAge()A.Person B.getAge C.usr.lib.python.person D.main
9、E.An exception is thrown · 8. What gets printed?() · names1 = 'Amir', 'Barry', 'Chales', 'Dao'·· if 'amir' in names1:· print 1· else:· print 2A.1 B.2 C.An exception is thrown · 9. What gets printed?() · numbers = 1,
10、 2, 3, 4·· numbers.append(5,6,7,8)·· print len(numbers)A.4 B.5 C.8 D.12 E.An exception is thrown · 10. What gets printed?() · kvps = '1' : 1, '2' : 2 · theCopy = kvps.copy()·· kvps'1' = 5·· sum = kvps'1' + theCopy
11、'1'· print sumA.1 B.2 C.6 D.10 E.An exception is thrown 三,shell筆試題(15分)文件如下: # cat /etc/passwdroot:x:0:0:root:/root:/bin/bashbin:x:1:1:bin:/bin:/sbin/nologindaemon:x:2:2:daemon:/sbin:/sbin/nologinadm:x:3:4:adm:/var/adm:/sbin/nologinlp:x:4:7:lp:/var/spool/lpd:/sbin/nologinsync:x:5:0:sync
12、:/sbin:/bin/syncshutdown:x:6:0:shutdown:/sbin:/sbin/shutdownhalt:x:7:0:halt:/sbin:/sbin/haltmail:x:8:12:mail:/var/spool/mail:/sbin/nologinuucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologinoperator:x:11:0:operator:/root:/sbin/nologingames:x:12:100:games:/usr/games:/sbin/nologingopher:x:13:30:gopher:/var
13、/gopher:/sbin/nologinftp:x:14:50:FTP User:/var/ftp:/sbin/nologinnobody:x:99:99:Nobody:/:/sbin/nologindbus:x:81:81:System message bus:/:/sbin/nologinusbmuxd:x:113:113:usbmuxd user:/:/sbin/nologinvcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologinrpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:
14、/sbin/nologinrtkit:x:499:497:RealtimeKit:/proc:/sbin/nologinavahi-autoipd:x:170:170:Avahi IPv4LL Stack:/var/lib/avahi-autoipd:/sbin/nologinabrt:x:173:173:/etc/abrt:/sbin/nologinrpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologinnfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/no
15、loginhaldaemon:x:68:68:HAL daemon:/:/sbin/nologingdm:x:42:42:/var/lib/gdm:/sbin/nologinntp:x:38:38:/etc/ntp:/sbin/nologinapache:x:48:48:Apache:/var/www:/sbin/nologinsaslauth:x:498:76:"Saslauthd user":/var/empty/saslauth:/sbin/nologinpostfix:x:89:89:/var/spool/postfix:/sbin/nologinpulse:x:4
16、97:496:PulseAudio System Daemon:/var/run/pulse:/sbin/nologinsshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologintcpdump:x:72:72:/:/sbin/nologinneil:x:500:500:/home/neil:/bin/bashtest:x:501:501:/home/test:/bin/bashyulian:x:503:503:/home/yulian:/bin/bashpuppet:x:52:52:Puppet:/var/lib/pup
17、pet:/sbin/nologinjboss:x:504:504:/home/jboss:/bin/bashmysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bashrelease:x:505:505:/home/release:/bin/bashredis:x:496:493:Redis Server:/var/lib/redis:/sbin/nologinmongodb:x:184:492:MongoDB Database Server:/var/lib/mongodb:/sbin/nologinfang:x:506:506:/home/fang
18、:/bin/bashroundup:x:495:491:Roundup Issue Tracker:/var/lib/roundup:/sbin/nologinexim:x:93:93:/var/spool/exim:/sbin/nologindial:x:507:507:/home/dial:/bin/bashshare:x:508:508:/home/share:/bin/bash請打印出用戶名目在/home下面的的用戶名目,如下 /home/neil/home/test/home/yulian/home/jboss/home/release/home/fang/home/dial/home/share建議一行搞定。 四
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025天津市建筑安全員A證考試題庫附答案
- 生物-四川省金太陽2025屆高三2月開學考試試題和答案
- 2025年度房產(chǎn)出售代理售后服務協(xié)議
- 2025年度化工原料運輸事故應急預案合同
- 2025年度文化藝術公司公司掛靠文化藝術交流活動合同
- 2025年度農(nóng)村魚塘養(yǎng)殖權轉讓與漁業(yè)資源可持續(xù)利用合同
- 2025年度圖書出版著作權許可及翻譯權合同
- 2025年度電商運營顧問勞動合同
- 2025年度商業(yè)地產(chǎn)開發(fā)車位贈送及使用維護合同
- 2025年度個人自愿捐贈殘疾人福利基金協(xié)議書
- 《勞動合同法》普法宣傳資料
- 二年級下冊科學教案-2.3科技產(chǎn)品體驗會 大象版
- 退役軍人優(yōu)待證申領表
- Q∕SY 19001-2017 風險分類分級規(guī)范
- 勞務分包項目經(jīng)理崗位職責
- 幼兒繪本故事:奇怪的雨傘店
- 鋼琴基礎教程教案
- 糖基轉移酶和糖苷酶課件(PPT 111頁)
- 屋面網(wǎng)架結構液壓提升施工方案(50頁)
- (語文A版)四年級語文下冊課件跳水 (2)
- 第6章向量空間ppt課件
評論
0/150
提交評論