print 45678+0x12fd2
print 'Learn Python in imooc'
print 100<99
print 0xff==255
不需小写,也不需分号,直接输入即可
print 'Learn Python in imooc'
print 100<99
print 0xff==255
不需小写,也不需分号,直接输入即可
2015-10-18
x1 = 1
d = 3
n = 100
x100 = x1 + (100 - 1) * 3
s = 100 * x1 + (n*(n-1))/2 * d
print s
d = 3
n = 100
x100 = x1 + (100 - 1) * 3
s = 100 * x1 + (n*(n-1))/2 * d
print s
2015-10-18
print [int(str(i) + str(j) + str(k)) for i in range(1,10) for j in range(0,10) for k in range(1,10) if i == k]
2015-10-18
#Enter a code
print 45678+0x12fd2
print "Learn Python in imooc"
print 100<99
print 0xff==255
print 45678+0x12fd2
print "Learn Python in imooc"
print 100<99
print 0xff==255
2015-10-16
s = set(['Adam', 'Lisa', 'Paul'])
L = ['Adam', 'Lisa', 'Bart', 'Paul']
for i in L:
if i in s:
s.remove(i)
else:
s.add(i)
print s
L = ['Adam', 'Lisa', 'Bart', 'Paul']
for i in L:
if i in s:
s.remove(i)
else:
s.add(i)
print s
2015-10-15
print r'''"To be ,or not to be":
that is the question.
Whether it's nobler in the mind to suffer.'''
不明白到底哪里错了
that is the question.
Whether it's nobler in the mind to suffer.'''
不明白到底哪里错了
2015-10-15
好像还可以用于求和啊!
L=list(range(100))
s=0.0
for x in L:
s=s+x
print(s)
L=list(range(100))
s=0.0
for x in L:
s=s+x
print(s)
2015-10-14