#!/usr/bin/envpython
#-*-coding:utf-8-*-
#Python用print()函数输出田字格
row=”
foriinrange(1,12):
forjinrange(1,12):
ifiin(1,6,11):
ifjin(1,6,11):
row=row+’+’+”
else:
row=row+’–‘+”
else:
ifjin(1,6,11):
row=row+’|’+”
else:
row=row+”+”
row=row+’\n’
printrow
首页 >
#!/usr/bin/envpython
#-*-coding:utf-8-*-
#Python用print()函数输出田字格
row=”
foriinrange(1,12):
forjinrange(1,12):
ifiin(1,6,11):
ifjin(1,6,11):
row=row+’+’+”
else:
row=row+’–‘+”
else:
ifjin(1,6,11):
row=row+’|’+”
else:
row=row+”+”
row=row+’\n’
printrow