猫史档案馆


【Python作品分享】农历【作品秀】

用户:无邪的巨叶龙jNOj无邪的巨叶龙jNOj查看:0 回复:1 评论:0 创建时间:2023-08-20T19:44:18


【作品展示】

center_image

 

【作品介绍】

动画农历

 

【作品源代码】

import requests
import turtle
import time
import json

__Pen = turtle.Pen()


res = requests.get('https://zj.v.api.aa1.cn/api/nl/')
res = res.text
res_zd = json.loads(res)

__Pen.pencolor("#ff0000")
turtle.bgcolor("#33ccff")
__Pen.penup()
__Pen.goto((-200), 200)
__Pen.pendown()
__Pen.write(res_zd['today'], font = ('Arial', 30, 'italic'))
__Pen.penup()
__Pen.right(90)
__Pen.forward(100)
__Pen.left(90)
__Pen.pendown()
__Pen.write(res_zd['jq'], font = ('Arial', 30, 'italic'))
__Pen.penup()
__Pen.right(90)
__Pen.forward(100)
__Pen.left(90)
__Pen.pendown()
__Pen.write(res_zd['nl'], font = ('Arial', 30, 'italic'))
__Pen.penup()
__Pen.right(90)
__Pen.forward(100)
__Pen.left(90)
__Pen.pendown()
__Pen.write(res_zd['xq'], font = ('Arial', 30, 'italic'))
__Pen.penup()
__Pen.right(90)
__Pen.forward(100)
__Pen.left(90)
__Pen.pendown()
__Pen.write(res_zd['gzr'], font = ('Arial', 30, 'italic'))
__Pen.penup()
__Pen.right(90)
__Pen.forward(100)
__Pen.left(90)
__Pen.pendown()
__Pen.write(res_zd['nly'], font = ('Arial', 30, 'italic'))
__Pen.penup()
__Pen.right(90)
__Pen.forward(100)
__Pen.left(90)
__Pen.pendown()
while True:
    time.sleep(1)
# https://unpkg.com/province-city-china@8.5.0/dist/city.json

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
lingyi_objlingyi_obj

https://www.wjx.cn/vm/Ya3BmHB.aspx

帮忙做一下,班级小课题研究,谢谢

点赞0


评论