我的回答:
print [int(str(m)+str(n)+str(q)) for m in range(1,10) for n in range(0,10) for q in range(0,10) if m == q ]
print [int(str(m)+str(n)+str(q)) for m in range(1,10) for n in range(0,10) for q in range(0,10) if m == q ]
2018-09-19
hello, python 这里,a为真,所以到a就不继续了
hello, world 这里,b为假,所以or运算,world为真,所以是hello world
hello, world 这里,b为假,所以or运算,world为真,所以是hello world
2018-09-18
x1 = 1
d = 3
n = 100
x100 = x1+(n-1)*d
s = (x1+x100)*50
print s
正确代码
d = 3
n = 100
x100 = x1+(n-1)*d
s = (x1+x100)*50
print s
正确代码
2018-09-18
print (4567+0x12fd2)
print ('learn ptthon ')
print(100<99)
print(0xff==255)
我的电脑应该是这样输入啊,为啥你们的都不需要括号呢
print ('learn ptthon ')
print(100<99)
print(0xff==255)
我的电脑应该是这样输入啊,为啥你们的都不需要括号呢
2018-09-18
print [ x*100 + y*10 + z for x in range(1, 10) for y in range(0,10) for z in range(0,10) if x == z]
结束打卡,谢谢老师
结束打卡,谢谢老师
2018-09-18
def generate_tr(name, score):
if score<60:
return '<tr><td>%s</td><td style="color:red">%s</td></tr>' % (name, score)
else:
return '<tr><td>%s</td><td>%s</td></tr>' % (name, score)
tds = [generate_tr(name, score) for name, score in d.iteritems()]
没有变色,提交正确
if score<60:
return '<tr><td>%s</td><td style="color:red">%s</td></tr>' % (name, score)
else:
return '<tr><td>%s</td><td>%s</td></tr>' % (name, score)
tds = [generate_tr(name, score) for name, score in d.iteritems()]
没有变色,提交正确
2018-09-18