L = []
x = 1
while True:
L.append(x*x)
x = x + 1
if x > 100:
break
print sum(L)
x = 1
while True:
L.append(x*x)
x = x + 1
if x > 100:
break
print sum(L)
2015-02-01
x1 = 1
d = 3
n = 100
x100 = (x1 + d * (n-1))
s = (x1 + x100) * n / 2
print s
d = 3
n = 100
x100 = (x1 + d * (n-1))
s = (x1 + x100) * n / 2
print s
2015-01-30
if score<60:
a=r'''style="color:red"'''
else:
a=""
return '<tr><td>%s</td><td %s>%s</td></tr>' % (name,a,score)
a=r'''style="color:red"'''
else:
a=""
return '<tr><td>%s</td><td %s>%s</td></tr>' % (name,a,score)
2015-01-30
sum = 0.0
for v in d.itervalues():
sum = sum + v
print sum / len(d)
for v in d.itervalues():
sum = sum + v
print sum / len(d)
2015-01-30