Python实例

逢7拍手游戏

for i in range(0,100):
    i=i+1
    print(i,end="")
    if(i%7==0 or i%10==7 or i//10==7):
        print(" 拍手")
    else:
        continue

五子棋盘

x = 10
print("┌-",end="")
for i in range(1, x):
    print("-┬-",end="")
print("-┐")
for i in range(2, x):
  print("├-",end="")
  for j in range(1, x):
      print("-┼-",end="")
      if(j == x-1):
         print("-┤")
print("└-",end="")
for i in range(1, x):
    print("-┴-",end="")
print("-┘")

100-200不被3整除的数

for i in range(100,200):
    if i%3==0:
        continue
    else:
        print(i," ",end="")

1-100之间的素数

for i in range(2,101):
    j = 2
    while i%j!=0:
        j=j+1
    if j==i:
        print(i," ",end="")
消息盒子
# 您需要首次评论以获取消息 #
# 您需要首次评论以获取消息 #

只显示最新10条未读和已读信息