Python第一次周考(0402)

2019獨角獸企業重金招聘Python工程師標準>>> hot3.png

一、單選

1、Python3中下列語句錯誤的有哪些?

A s = input()

B s = raw_input()

C?print('hello world.')

D print('''hello world.''')

2、下面哪個是 Pycharm 在 Windows 下 默認 用于“批量注釋”的快捷鍵

A Ctrl + d

B Ctrl + 鼠標左鍵

C Ctrl + /

D Ctrl + Shift + f

3、下面哪個是 Pycharm 在 Windows 下 默認 用于“查找當前文件中的關鍵字”的快捷鍵

A Ctrl + f

B Ctrl + Shift + f

C Ctrl + n

D Ctrl + Shift + n

4、下面哪個是 Pycharm 在 Windows 下 默認 用于“查找當前項目中的關鍵字”的快捷鍵?

A Ctrl + f

B Ctrl + Shift + f

C Ctrl + n

D Ctrl + Shift + n

5、下面哪個是 Pycharm 在 Windows 下 默認 用于“搜索最近編輯過的文件”的快捷鍵

A Ctrl + e

B Ctrl + Shift + p

C Ctrl + p

D Ctrl + Shift + e

6、下面哪個是 Pycharm 在 Windows 下 默認 用于“任意位置換行”的快捷鍵

A Ctrl + Enter

B Ctrl + Shift + Enter

C Ctrl + Shift

D Shift + Enter

7、下面哪個是 Pycharm 在 Windows 下 默認 用于“快速代碼格式化(PEP8格式)”的快捷鍵

A Ctrl + Alt + L

B Shift + L

C Alt + L

D Ctrl + Shift + L

8、Python關系運算符中表示“不等于”的是哪個?

A ==

B =!

C !=

D !!

9、下面選項哪個是python不支持的數據類型

A char ? ? ? ? ? ? ? ?

B int ? ? ? ? ? ? ? ? ?

C float ? ? ? ? ? ? ? ?

D list

10、下列表達式的值為True的是

A 5+4j > 2-3j ? ? ? ? ? ? ? ? ? ? ? ?

B 3>2<=2

C (3,2) 'xyz'

D 1=1

11、如何定義一個list?

A a=(1,2,3,4,5)

B a=[1 2 3 4 5]

C a={ 1 2 3 4 5}

D a=[1,2,3,4,5]

12、如下賦值,b[0]的值是?

a=100

b=["a",20,10,55,90]

A 100

B a

C "a"

D 'a'

13、定義列表?list=['abc',99,'ccc','ddd'] ?然后執行 ?list.pop() ?則list的值為?

A?['abc', 99, 'ccc']

B?['abc', 99, 'ccc', 'ddd']

C [abc, 99, ccc]

D 'ddd'

14、如果我們需要把連個字典合并是一個字典,需要調用字典的哪種方法

A. update
B. index
C. append
D. get

15、字典的pop方法的返回值是什么

A. key
B. value
C. 元素下標
D. 無

16、字典的value是什么類型的數據

A. str
B. list
C. tuple
D. 可以為任何類型

17、表達式a, b = (1, 2)代表的是什么意思

A. a = b = 1
B. a = b = 2
C. a = 1, b = 2
D. a = 2, b = 1

二、多選題

1、Pycharm設置Python模板文件中可以使用的變量有哪些?

A ${TIME}?${DATE}

B ${USER}

C ${AUTHOR}

D ${NAME}

2、下面選項哪些是正確的?

A 位:計算機的計算單位,代表0或者1

B 字節:一字節相當于8位

C Python中單行注釋的符號是 '#'

D?Python中多行注釋的符號是 '/**/'

3、以下運算符正確的有?

A a**b

B a == b

C c //= b

D not(a and b)

4、下面選項對變量賦值,哪個是正確的?

A s='It's my book'

B s="It's my book"

C s='It\'s my book'

D s="It\'s my book"

5、假設str='This is a test character.',以下選項正確的有?

A print str[:-3]的結果為This is a test charac

B print str[1:10]的結果為This is a

C print str[::-1]的結果為.retcarahc tset a si sihT

D print str[2]的結果為i

6、字典常用的定義方式有哪些?

A. dict(a=1, b=2)
B. {“name”: “lingjing”}
C. dict([(“name”, “ling”), (“age”, 20)])
D. 以上都是

7、我們想判斷一個數據的類型,可以使用下面的哪個函數

A. type
B. help
C. isinstance
D. hasattr

8、以下哪個選項是一個json串

A. 以下都是
B. [{"name": "ling"}, {"a": "1"}]
C. dict(a=1, b=2)
D. {"hello": "world"}

?

三、正確答案

單選題

1--5 BCABD ? ?6--10 DACAB ?11--17 ?DDAABDC

解析1?Python3中已經沒有aw_input了

多選 ??

1 ABD ?

解析:這里很容易把 C 選項也選上了,但實際上${AUTHOR}是沒有的,這個打開Pycharm試一遍就好了

2 ABC

解析:Python多行注釋的符號應該是 ''' """

3 ABCD?

4 BCD

5 CD

6 ABCD

7 AC

8 BD

轉載于:https://my.oschina.net/u/3821557/blog/1788893

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/390773.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/390773.shtml
英文地址,請注明出處:http://en.pswp.cn/news/390773.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

express 路由中間件_Express通過示例進行解釋-安裝,路由,中間件等

express 路由中間件表達 (Express) When it comes to build web applications using Node.js, creating a server can take a lot of time. Over the years Node.js has matured enough due to the support from community. Using Node.js as a backend for web applications a…

ASP.NET 頁面之間傳值的幾種方式

對于任何一個初學者來說&#xff0c;頁面之間傳值可謂是必經之路&#xff0c;卻又是他們的難點。其實&#xff0c;對大部分高手來說&#xff0c;未必不是難點。 回想2016年面試的將近300人中&#xff0c;有實習生&#xff0c;有應屆畢業生&#xff0c;有1-3年經驗的&#xff0c…

Mapreduce原理和YARN

MapReduce定義 MapReduce是一種分布式計算框架&#xff0c;由Google公司2004年首次提出&#xff0c;并貢獻給Apache基金會。 MR版本 MapReduce 1.0&#xff0c;Hadoop早期版本(只支持MR模型)MapReduce 2.0&#xff0c;Hadoop 2.X版本&#xff08;引入了YARN資源調度框架后&a…

數據可視化圖表類型_數據可視化中12種最常見的圖表類型

數據可視化圖表類型In the current era of large amounts of information in the form of numbers available everywhere, it is a difficult task to understand and get insights from these dense piles of data.在當今時代&#xff0c;到處都是數字形式的大量信息&#xff…

三大紀律七項注意(Access數據庫)

三大紀律&#xff08;規則或范式&#xff09; 要有主鍵其他字段依賴主鍵其他字段之間不能依賴七項注意 一表一主鍵(訂單表&#xff1a;訂單號&#xff1b;訂單明細表&#xff1a;訂單號產品編號)經常查&#xff0c;建索引&#xff0c;小數據&#xff08;日期&#xff0c;數字類…

CentOS下安裝JDK的三種方法

來源&#xff1a;Linux社區 作者&#xff1a;spiders http://www.linuxidc.com/Linux/2016-09/134941.htm 由于各Linux開發廠商的不同,因此不同開發廠商的Linux版本操作細節也不一樣,今天就來說一下CentOS下JDK的安裝: 方法一&#xff1a;手動解壓JDK的壓縮包&#xff0c;然后…

MapReduce編程

自定義Mapper類 class TokenizerMapper extends Mapper<Object, Text, Text, IntWritable> &#xff5b; … }自定義mapper類都必須實現Mapper類&#xff0c;有4個類型參數&#xff0c;分別是&#xff1a; Object&#xff1a;Input Key Type-------------K1Text: Input…

統計信息在數據庫中的作用_統計在行業中的作用

統計信息在數據庫中的作用數據科學與機器學習 (DATA SCIENCE AND MACHINE LEARNING) Statistics are everywhere, and most industries rely on statistics and statistical thinking to support their business. The interest to grasp on statistics also required to become…

IOS手機關于音樂自動播放問題的解決辦法

2019獨角獸企業重金招聘Python工程師標準>>> 評估手機自帶瀏覽器不能識別 aduio標簽重的autoplay屬性 也不能自動執行play()方法 一個有效的解決方案是在微信jssdk中調用play方法 document.addEventListener("WeixinJSBridgeReady", function () { docum…

svg標簽和svg文件區別_什么是SVG文件? SVG圖片和標簽說明

svg標簽和svg文件區別SVG (SVG) SVG or Scalable Vector Graphics is a web standard for defining vector-based graphics in web pages. Based on XML the SVG standard provides markup to describe paths, shapes, and text within a viewport. The markup can be embedded…

開發人員怎么看實施人員

英文原文&#xff1a;What Developers Think Of Operations&#xff0c;翻譯&#xff1a;張紅月CSDN 在一個公司里面&#xff0c;開發和產品實施對于IS/IT的使用是至關重要的&#xff0c;一個負責產品的研發工作&#xff0c;另外一個負責產品的安裝、調試等工作。但是在開發人員…

怎么評價兩組數據是否接近_接近組數據(組間)

怎么評價兩組數據是否接近接近組數據(組間) (Approaching group data (between-group)) A typical situation regarding solving an experimental question using a data-driven approach involves several groups that differ in (hopefully) one, sometimes more variables.使…

代碼審計之DocCms漏洞分析

0x01 前言 DocCms[音譯&#xff1a;稻殼Cms] &#xff0c;定位于為企業、站長、開發者、網絡公司、VI策劃設計公司、SEO推廣營銷公司、網站初學者等用戶 量身打造的一款全新企業建站、內容管理系統&#xff0c;服務于企業品牌信息化建設&#xff0c;也適應用個人、門戶網站建設…

你讓,勛爵? 使用Jenkins聲明性管道的Docker中的Docker

Resources. When they are unlimited they are not important. But when theyre limited, boy do you have challenges! 資源。 當它們不受限制時&#xff0c;它們并不重要。 但是&#xff0c;當他們受到限制時&#xff0c;男孩你有挑戰&#xff01; Recently, my team has fa…

翻譯(九)——Clustered Indexes: Stairway to SQL Server Indexes Level 3

原文鏈接&#xff1a;www.sqlservercentral.com/articles/StairwaySeries/72351/ Clustered Indexes: Stairway to SQL Server Indexes Level 3 By David Durant, 2013/01/25 (first published: 2011/06/22) The Series 本文是階梯系列的一部分&#xff1a;SQL Server索引的階梯…

power bi 中計算_Power BI中的期間比較

power bi 中計算Just recently, I’ve come across a question on the LinkedIn platform, if it’s possible to create the following visualization in Power BI:就在最近&#xff0c;我是否在LinkedIn平臺上遇到了一個問題&#xff0c;是否有可能在Power BI中創建以下可視化…

-Hive-

Hive定義 Hive 是一種數據倉庫技術&#xff0c;用于查詢和管理存儲在分布式環境下的大數據集。構建于Hadoop的HDFS和MapReduce上&#xff0c;用于管理和查詢分析結構化/非結構化數據的數據倉庫; 使用HQL&#xff08;類SQL語句&#xff09;作為查詢接口&#xff1b;使用HDFS作…

CentOS 7 安裝 JDK

2019獨角獸企業重金招聘Python工程師標準>>> 1、下載oracle jdk 下載地址&#xff1a; http://www.oracle.com/technetwork/java/javase/downloads/index.html 選擇同一協議&#xff0c;下載rpm格式版本jdk&#xff0c;或tar.gz格式jdk。 2、卸載本機openjdk 2.1、查…

javascript 布爾_JavaScript布爾說明-如何在JavaScript中使用布爾

javascript 布爾布爾型 (Boolean) Booleans are a primitive datatype commonly used in computer programming languages. By definition, a boolean has two possible values: true or false.布爾值是計算機編程語言中常用的原始數據類型。 根據定義&#xff0c;布爾值有兩個…

如何進行數據分析統計_對您不了解的數據集進行統計分析

如何進行數據分析統計Recently, I took the opportunity to work on a competition held by Wells Fargo (Mindsumo). The dataset provided was just a bunch of numbers in various columns with no indication of what the data might be. I always thought that the analys…