本页仅为文字内容,不可回答。

python线上自学技术测试题-大良校区

python源程序执行的方式
编译执行
解释执行
直接执行
边编译边执行
二、填空题(共30分,每空3分)
观察下列代码根据提示回答问题list0 = [1]list1 = [1, 1]list2 = [1, 2, 1]list3 = [1, 3, 3, 1]list4 = []for x in range(len(list3)): if x == 0: list4.append(1) else: list4.append(______________)list4.append(1)for i in range(5): alist = list+str(i) print(eval(alist))代码中横线部分选择那一项可以实现如下效果:Alist3[x-1] + list3[x]B list3[x] + list3[x+1]C list4[x] + list4[x+1]Dlist4[x-1] + list4[x]
    ____________
观察以下求水仙花数的程序,该程序中存在两处错误的代码分别是(1-7填数字)______,______。(按照先后顺序填写)for i in range(100,1000): s=0 1 t=0 2 while t: 3 s=s+(t%10)**3 4 t/=10 5 if s==i: 6 print(i) 7
填空1    ____________
填空2    ____________
以上程序语句中,哪句程序语句决定螺旋图形的形状( )
for x in range(400)
turtle.forward(2*x)
turtle.left(91)