@(Python)[ch01]
Neil 完成 ch1 任务啦
任务成果地址 : city_weather
任务成果截图: 成果图链接
程序使用说明地址: 暂无
个人教程地址: ......看了同学们的教程,有几位同学的做的真心让人叹为观止比如: @Vwan的 “天气通CLI版”
-
感想:
本周的学习方式采用的还是海量阅读+海量模仿, 中间遇到了字符串代码转换的问题,在Github上献出了自己的第一个 issue ch1任务遇到的字符串编码问题 53 感谢同学的热心回答, 对文件读取后的编码格式有了清晰的认识。
对函数 file Object 里面的 file.readlines(), String Methord 里面的str.split(), str.strip() 以及Dict 创建时的d[key] = value #set d[key] to value, 都有了深刻的理解和体验。
str.format() 函数在print() 里面的应用,极大的方便了Dictionary 数据结构的显示.
代码中的逻辑体验,尤其是下面这段 history[city] = weather[city] 的位置,能感觉到一种逻辑上的简洁优美
```python
def get_weather_info():
try:
print('{} the weather is :{}'.format(city, weather[city]))
history[city] = weather[city]
except:
print("sorry, the city you input is inexistent, please input again")
get_help()
```
-
接下来一周 : 进一步加深对数据结构的理解和掌握,对标准库里常用函数的使用进一步探索和加深记忆,继续关注优秀分享如:
1. Pair Programming.Xidan->Talk is cheap, show me the code.
2. Teach yourself if you can in 6 months ago