sum = 0
x = 1
while x < 100:
x = x + 2
sum = sum + x
print sum
x = 1
while x < 100:
x = x + 2
sum = sum + x
print sum
2019-02-27
L = ['Adam', 'Lisa', 'Bart']
L[-1] = 'Adam'
L[0] = 'Bart'
print L
L[-1] = 'Adam'
L[0] = 'Bart'
print L
2019-02-27
L = ['Adam', 'Lisa', 'Paul', 'Bart']
L.pop(2)
L.pop(2)
print L
L.pop(2)
L.pop(2)
print L
2019-02-27
L = ['Adam', 'Lisa', 'Bart']
L = L.insert(2,'Paul')
print L
L = L.insert(2,'Paul')
print L
2019-02-27
L = [95.5,85,59]
print L[0]
print L[1]
print L[2]
#print L[3]
print L[0]
print L[1]
print L[2]
#print L[3]
2019-02-27
l=[0]
k=1
while True:
k1=k*k
k+=1
l.append(k1)
if k>100:
break
print(sum(l))
k=1
while True:
k1=k*k
k+=1
l.append(k1)
if k>100:
break
print(sum(l))
2019-02-27
for x in [1,2,3,4,5,6,7,8,9]:
for y in [0,1,2,3,4,5,6,7,8,9]:
if x>=y:
continue
print x*10+y
for y in [0,1,2,3,4,5,6,7,8,9]:
if x>=y:
continue
print x*10+y
2019-02-27
最新回答 / 慕娘1129934
for x in range(1,10): for y in range(0,10): for z in range (1,10): if x==z: L.append(x*100+y*10+z)
2019-02-27
sum = 0
x = 0
while True:
x = x + 1
if x > 100:
break
elif x%2 == 0:
continue
sum+=x
print sum
x = 0
while True:
x = x + 1
if x > 100:
break
elif x%2 == 0:
continue
sum+=x
print sum
2019-02-27