内蒙古自治区包头市全国计算机等级考试Python语言程序设计专项练习(含答案).docxVIP

  • 8
  • 0
  • 约8.77千字
  • 约 17页
  • 2023-07-08 发布于河北
  • 举报

内蒙古自治区包头市全国计算机等级考试Python语言程序设计专项练习(含答案).docx

内蒙古自治区包头市全国计算机等级考试Python语言程序设计专项练习(含答案) 学校:________ 班级:________ 姓名:________ 考号:________ 一、单选题(30题) 1.下面代码的输出结果是()。def fun(x,y ,z):u = x + y - zprint (u)fun(l +2j,5,4 - lj) A.NameError B.(2+3j) C.2 D.3j? 2.设str1=‘*@python@*’,语句print(str1[2:]. strip(‘@’))的执行结果是()。 A.python@ * B.python* C.*@python@* D.*python*? 3.对于以下代码的描述正确的是()。 s=”Python is good” l=”isn’t it?” length=len(s) s_title=s.title() s_l=s+1 s_number=s[1:6] print(length) A.length为12。? B.s_title为”PYTHON IS GOOD”? C.s_1为”Python is good isn’t it?”? D.s_number为”Python”? 4.下面代码的输出结果是()。 a=1 def fun(a): a=a+2 return a print(a,fun(a)) A.

文档评论(0)

1亿VIP精品文档

相关文档