用python和pygame写一个五子棋人机对弈游戏
效果演示:代码:'''五子棋之人机对战 大白博客:www.c1i.cn ''' import sys import random import pygame from pygame.locals import * import pygame.gfxdraw from collections import namedt...
用python画一个圣诞树(4种)
第1种:演示图代码:height = 5 stars = 1 for i in range(height): print((' ' * 9) + (' ' * (height - i)) + ('▲' * stars)) stars += 2 print((' ' * 9) + (' ' * height) + '▋') print('...