找回密码
 中文实名注册
查看: 117|回复: 0

【python]王瑞哲 实验小学 五升六

[复制链接]

5

主题

63

帖子

309

积分

中级会员

Rank: 3Rank: 3

积分
309
发表于 2022-8-13 15:10:52 | 显示全部楼层 |阅读模式
import api
city = input('请输入城市的名称')
weather = api.get_weather(city)
print(weather)

if weather == '晴':
    print('天气晴朗,适合出去玩哦')
if weather == '雨':
    print('明天会下雨!穿好雨衣!')
if weather == '雪':
    print('下雪天穿厚点,别感冒了')
if weather == '阴':
    print('明天阴天,心情不好?听听音乐吧!')





回复

使用道具 举报

您需要登录后才可以回帖 登录 | 中文实名注册

本版积分规则

小黑屋|东台市机器人学会 ( 苏ICP备2021035350号-1;苏ICP备2021035350号-2;苏ICP备2021035350号-3 )

GMT+8, 2024-3-29 15:56 , Processed in 0.043595 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表