Prelab 7

Preparation for completing Lab 7 - Weather Report. There is nothing to turn in for this prelab.

  1. Be sure to review the notes and watch the videos in the Command line, URLs, and Debugging lecture.

  2. Review the example files in the Command line, URLs and Debugging lecture. See the bottom of the notes for links to the examples.

  3. Try out the following functions so you understand what they do and how they work. Write docstrings for them and feel free to include them in your weather_aggregator.py file.

    import datetime
       
    def get_hour():
        now = datetime.datetime.now()
        return str(now.hour)
       
    def get_date():
        now = datetime.datetime.now()
        return str(now.month) + "-" + str(now.day) + "-" + str(now.year)
    
  4. Just for the experience, try running python3 (or python in Windows) from the command line as demonstrated in lecture. That is, open the system shell from the Thonny menu “Tools->Open System Shell”.

  5. Make sure you understand the relationship between the two programs weather_report.py and weather_aggregator.py. You may want to write out a preliminary design on paper. Please be in touch with questions!