Week1 Project practice : Weather Report

Requirements description

1. Input city, output weather info
2. Input 'h' or 'help', print usage guide
3. Input 'exit' or 'quit' to quit the script
4. Print all the query records before quit

Break down to small tasks

1. Read a txt file named 'weather_info.txt'.
2. Get the data from the file, then save the data in dictionary.
3. Chinese character decoding and encoding.
4. How to write help for script?
5. How to quit a script?
6. What does "\_\_name\_\_" mean?

To implement the function, I need to understand:

  • read file
  • dictionary
  • character decoding and encoding
    • ASCII
    • GBK
    • Unicode, UTF-8
    • String and bytes in Python3 vs. unicode and 8-bit Python2
  • loop
  • exit
  • __name__
  • argparse

results matching ""

    No results matching ""