
Python项目
one_zero_one
这个作者很懒,什么都没留下…
展开
-
python 实现 2048 game
''' 流程思路:2048游戏 游戏规则 4*4 在空的地方随机出现2,4 操作(上下左右) 输赢 设计流程 棋盘:用一个字符串表示 棋子:矩阵 嵌套的列表来表示 操作:根据方向,操作不同行 游戏流程: 开始 初始化 生成棋子 输出棋盘 等待用户的操作 ...原创 2019-06-23 13:01:54 · 525 阅读 · 0 评论 -
和风查询天气
import json, requests, sys print('请输入您要查询的城市:') loc=input() #The key is used for my personal usage, please do not use it random, thx. key1='38810bc1e40a401fb6ca6ff04a4f056b' canshu={'location':loc,'k...原创 2019-06-23 17:15:22 · 312 阅读 · 0 评论 -
用Python下载xkcd图片
一单线程下载 import requests,os,bs4 print(os.getcwd()) url='http://xkcd.com' os.makedirs('xkcd',exist_ok=True) while not url.endswith('100'): print('downloading page %s...'%url) res=requests.get(...原创 2019-06-30 15:45:57 · 236 阅读 · 1 评论