课程
/后端开发
/Python
/初识Python
求代码
2017-04-11
源自:初识Python 7-2
正在回答
n = 1
L = []
while n<=100:
L.append(n**2)
n = n+1
print sum(L)
print(L)
qq_Ai最美_0 提问者
L = [] for i in range(1,101): L.append(i*i) def sum(L): sum = 0; for x in L: sum +=x return sum print sum(L)
L=[]for i in range(1,101): L.append(i*i)print sum(L)
def sum_l(l): sum = 0 for x in l: sum = sum + x * x return sum print(range(1, 101))
SiriusPK 回复 qq_Ai最美_0 提问者
L = [] n=1 while n<101: L.append(n*n) n+=1 print sum(L)
FishSeeker 回复 qq_Ai最美_0 提问者
举报
学python入门视频教程,让你快速入门并能编写简单的Python程序