APP下载
首页
>
财会金融
>
计算机python题库总
搜索
计算机python题库总
题目内容
(
单选题
)
17.( )对于foriins:......语句,以下说法不正确的是()。

A、 如果s为字符串,则该循环执行时,i取值会对字符串中的每个字符进行遍历

B、 如果s为列表,则该循环执行时,i取值会对列表中的每个元素进行遍历

C、 如果s为字典,则该循环执行时,i取值会对字典中的每个键值对进行遍历

D、 如果s为集合,则该循环执行时,i取值会对集合中的每个元素进行遍历

答案:C

计算机python题库总
3.( )continue语句用于()
https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa9-047f-c032-a61f4fe39600.html
点击查看题目
13.(B)下面if语句统计满足”性别【gender】为女、年龄【age】在40岁以下、在公司任职【service()time】超过10年”条件的同事人数,正确的语句为:
https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa8-e772-c032-a61f4fe39600.html
点击查看题目
7.( )break语句只能用于循环语句中。
https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa8-f83d-c032-a61f4fe39600.html
点击查看题目
10.( )默认参数传递指的是没有传入对应参数值的时候,就不使用该参数
https://www.shititong.cn/cha-kan/shiti/00057e3f-2faa-2cb9-c032-a61f4fe39600.html
点击查看题目
8.( )元组和列表一样,都可以包含不同类型的元素,且其中的元素都可以删除。
https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa9-715e-c032-a61f4fe39600.html
点击查看题目
12.( )现有d={},python3解释器执行d['a']='b'后d的结果是()
https://www.shititong.cn/cha-kan/shiti/00057e3f-2faa-0859-c032-a61f4fe39600.html
点击查看题目
9.( )以下程序的输出结果是:
https://www.shititong.cn/cha-kan/shiti/00057e3f-2faa-4d22-c032-a61f4fe39600.html
点击查看题目
9.( )关于条件判断语句中的条件:要求s小于50大于等于20,以下()选项描述不正确。
https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa8-df69-c032-a61f4fe39600.html
点击查看题目
1.( )以下程序段中循环共执行4次。foriinrange(2,10,2):print(i)
https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa8-ebaa-c032-a61f4fe39600.html
点击查看题目
8.( )以下哪个变量标识符是错误的。
https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa8-aaa6-c032-a61f4fe39600.html
点击查看题目
首页
>
财会金融
>
计算机python题库总
题目内容
(
单选题
)
手机预览
计算机python题库总

17.( )对于foriins:......语句,以下说法不正确的是()。

A、 如果s为字符串,则该循环执行时,i取值会对字符串中的每个字符进行遍历

B、 如果s为列表,则该循环执行时,i取值会对列表中的每个元素进行遍历

C、 如果s为字典,则该循环执行时,i取值会对字典中的每个键值对进行遍历

D、 如果s为集合,则该循环执行时,i取值会对集合中的每个元素进行遍历

答案:C

分享
计算机python题库总
相关题目
3.( )continue语句用于()

A. 退出循环程序

B. 结束本次循环

C. 空操作

D. 引发异常处理

https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa9-047f-c032-a61f4fe39600.html
点击查看答案
13.(B)下面if语句统计满足”性别【gender】为女、年龄【age】在40岁以下、在公司任职【service()time】超过10年”条件的同事人数,正确的语句为:

A. A

B. B

C. C

D. D

https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa8-e772-c032-a61f4fe39600.html
点击查看答案
7.( )break语句只能用于循环语句中。
https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa8-f83d-c032-a61f4fe39600.html
点击查看答案
10.( )默认参数传递指的是没有传入对应参数值的时候,就不使用该参数
https://www.shititong.cn/cha-kan/shiti/00057e3f-2faa-2cb9-c032-a61f4fe39600.html
点击查看答案
8.( )元组和列表一样,都可以包含不同类型的元素,且其中的元素都可以删除。
https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa9-715e-c032-a61f4fe39600.html
点击查看答案
12.( )现有d={},python3解释器执行d['a']='b'后d的结果是()

A. {'a':'b'}

B. {a:b}

C. {'a','b'}

D. 报错无法运行

https://www.shititong.cn/cha-kan/shiti/00057e3f-2faa-0859-c032-a61f4fe39600.html
点击查看答案
9.( )以下程序的输出结果是:

A. [“12”,”23”]

B. ”12”,”23”

C. 1223

D. []

https://www.shititong.cn/cha-kan/shiti/00057e3f-2faa-4d22-c032-a61f4fe39600.html
点击查看答案
9.( )关于条件判断语句中的条件:要求s小于50大于等于20,以下()选项描述不正确。

A. 20<=s<50是合法的

B. 20<=s<50不是合法的

C. s=20

D. s20ors=20)

https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa8-df69-c032-a61f4fe39600.html
点击查看答案
1.( )以下程序段中循环共执行4次。foriinrange(2,10,2):print(i)
https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa8-ebaa-c032-a61f4fe39600.html
点击查看答案
8.( )以下哪个变量标识符是错误的。

A. A

B. B

C. C

D. D

https://www.shititong.cn/cha-kan/shiti/00057e3f-2fa8-aaa6-c032-a61f4fe39600.html
点击查看答案
试题通小程序
试题通app下载