没有合适的资源?快使用搜索试试~ 我知道了~
1. 根据课的作息时间表,动播放铃声 2. 起床铃声后播报天预报,课间播报英语听,饭点提醒吃饭等 3. 播报天预报前,会先播放提示“叮” 1.基础库 2.获取天
资源详情
资源评论
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/86328556/bg1.jpg)
温
州
中
学
作
息⼴
播
系统
(
schedule
版
)
功
能
描
述
1.
根
据
⽹
课
的
作
息
时
间
表
,
⾃
动
播放
铃
声
。
2.
起
床
铃
声
后
播
报
天
⽓
预
报
,
课
间
播
报
英
语
听
⼒
,
饭
点
提
醒
吃
饭
等
。
3.
播
报
天
⽓
预
报
前
,
会
先
播放提
示
⾳
“
叮
”
。
注
:
在
“
虚
⾕
号
”
上
部
署
该
系统
,
只
需
要
将
.py
代
码
复
制到
“vvBoard”
的
“Python”
⽂
件
夹
,
⽂
件
名
为
“main.py”
。
1.
基
础
库
In[1]:
import os,sys,time,datetime
import requests,re
from aip import AipSpeech
import schedule
2.
获
取
天
⽓
的
函
数
使
⽤
“
⼼
知
天
⽓
”API
,
以
北
京为例
返
回
的
信
息
格
式
如
下:
{"results":[{"location":{"id":"WX4FBXXFKE4F","name":"
北
京
","country":"CN","path":"
北
京
,
北
京
,
中
国
","timezone":"Asia/Shanghai","timezone_offset":"+08:00"},"now":
{"text":"
晴
","code":"1","temperature":"7"},"last_update":"2020-02-22T18:10:00+08:00"}]}
In[2]:
#
获
取
天
⽓
预
报
,
参
数
为
城
市
的
名
称
,
如
wenzhou
def get_weather(location):
API='https://api.seniverse.com/v3/weather/now.json'
KEY='S_zw8qq3BQPUr1wMU'
result = requests.get(API, params={
'key': KEY,
'location': location,
'language': 'zh-Hans',
'unit': 'c'
}, timeout=1)
result=result.json()
r=result["results"][0]
s1=r["location"]["name"] #
城
市
名
称
s2=r["now"]["text"] #
天
⽓
信
息
s3=r["now"]["temperature"] #
⽓
温
s=s1 + '
今
天
的
天
⽓
' + s2 +'
,
⽓
温
'+ s3
return s
3.
获
取
随
机
英
语
的
函
数
![application/msword](https://img-home.csdnimg.cn/images/20210720083327.png)
![application/msword](https://img-home.csdnimg.cn/images/20210720083327.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![txt](https://img-home.csdnimg.cn/images/20210720083642.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![avatar](https://profile-avatar.csdnimg.cn/f013ca01c6ff4a74a3a76c2d35072825_weixin_35794280.jpg!1)
养生的控制人
- 粉丝: 18
- 资源: 333
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)
评论0