Weatherman

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

TASK‌‌1 

‌ ‌
Weather‌‌Man‌  ‌
 ‌
This‌‌directory‌‌‌contains‌‌weather‌‌files‌‌for‌‌Murree.‌‌Write‌‌an‌‌application‌‌that‌‌generates‌‌the‌‌ 
following‌‌reports.‌‌The‌‌user‌‌can‌‌specify‌‌more‌‌than‌‌one‌‌report‌‌at‌‌the‌‌same‌‌time.‌‌You‌‌have‌3 ‌ ‌‌days‌‌  
to‌‌submit‌‌the‌‌first‌‌iteration‌‌from‌‌the‌‌day‌‌you‌‌are‌‌assigned‌‌this‌‌task.‌  ‌
 ‌
The‌‌program‌‌should‌‌be‌‌designed‌‌as‌‌follows:‌  ‌
1. Define‌‌a‌‌data‌‌structure‌‌for‌‌holding‌‌each‌‌weather‌‌reading.‌  ‌
2. Define‌‌a‌‌class‌‌for‌‌parsing‌‌the‌‌files‌‌and‌‌populating‌‌the‌‌readings‌‌data‌‌structure‌‌with‌‌
 
correct‌‌data‌‌types.‌  ‌
3. Define‌‌a‌‌data‌‌structure‌‌for‌‌holding‌‌the‌‌calculations‌‌results.‌  ‌
4. Define‌‌a‌‌class‌‌for‌‌computing‌‌the‌‌calculations‌‌given‌‌the‌‌readings‌‌data‌‌structure.‌  ‌
5. Define‌‌a‌‌class‌‌for‌‌creating‌‌the‌‌reports‌‌given‌‌the‌‌results‌‌data‌‌structure.‌  ‌
6. Define‌m ‌ ain‌‌‌for‌‌assembling‌‌the‌‌above‌‌and‌‌running‌‌the‌‌program.‌  ‌
7. Pep-8‌‌conventions‌‌should‌‌be‌‌followed‌‌in‌‌the‌‌code.‌  ‌
 ‌
1.‌‌For‌‌a‌‌given‌‌year‌‌display‌‌the‌‌highest‌‌temperature‌‌and‌‌day,‌‌lowest‌‌temperature‌‌and‌‌day,‌‌most‌‌  
humid‌‌day‌‌and‌‌humidity.‌  ‌
 ‌
weatherman.py‌‌/path/to/files-dir‌‌-e‌‌2002‌  ‌
Highest:‌‌45C‌‌on‌‌June‌‌23‌  ‌
Lowest:‌‌01C‌‌on‌‌December‌‌22‌  ‌
Humidity:‌‌95%‌‌on‌‌August‌‌14‌  ‌
 ‌
2.‌‌For‌‌a‌‌given‌‌month‌‌display‌‌the‌‌average‌‌highest‌‌temperature,‌‌average‌‌lowest‌‌temperature,‌‌  
average‌‌mean‌‌humidity.‌  ‌
 ‌
weatherman.py‌‌/path/to/files-dir‌‌-a‌‌2005/6‌  ‌
Highest‌‌Average:‌‌39C‌  ‌
Lowest‌‌Average:‌‌18C‌  ‌
Average‌‌Mean‌‌Humidity:‌‌71%‌  ‌
 ‌
3.‌‌For‌‌a‌‌given‌‌month‌‌draw‌‌two‌‌horizontal‌‌bar‌‌charts‌‌on‌‌the‌‌console‌‌for‌‌the‌‌highest‌‌and‌‌lowest‌‌  
temperature‌‌on‌‌each‌‌day.‌‌Highest‌‌in‌‌red‌‌and‌‌lowest‌‌in‌‌blue.‌  ‌
 ‌
weatherman.py‌‌/path/to/files-dir‌‌-c‌‌2011/03‌  ‌
March‌‌2011‌  ‌
01‌+ ‌ ++++++++++++++++++++++++‌‌‌25C‌  ‌
01‌+ ‌ ++++++++++‌‌‌11C‌  ‌
02‌+ ‌ +++++++++++++++++++++‌‌‌22C‌  ‌
02‌+ ‌ +++++++‌‌‌08C‌  ‌
 ‌
4.‌‌Multiple‌‌Reports‌  ‌
weatherman.py‌‌/path/to/files-dir‌‌-c‌‌2011/03‌‌-a‌‌2011/3‌‌-e‌‌2011‌  ‌
 ‌
5.‌‌BONUS‌‌TASK.‌‌For‌‌a‌‌given‌‌month‌‌draw‌‌one‌‌horizontal‌‌bar‌‌chart‌‌on‌‌the‌‌console‌‌for‌‌the‌‌
 
highest‌‌and‌‌lowest‌‌temperature‌‌on‌‌each‌‌day.‌‌Highest‌‌in‌‌red‌‌and‌‌lowest‌‌in‌‌blue.‌  ‌
 ‌
weatherman.py‌‌/path/to/files-dir‌‌-c‌‌2011/3‌  ‌
March‌‌2011‌  ‌
01‌+‌ ++++++++++‌+++++++++++++++++++++++++‌‌‌11C‌‌-‌‌25C‌  ‌
02‌+‌ +++++++‌++++++++++++++++++++++‌‌‌08C‌‌-‌‌22C‌  ‌
 ‌
 ‌
 ‌
 ‌
 ‌

   ‌

You might also like