Forecast the weather Write the shortest program to forecast the weather for the next 7 days

The input (from stdin) is the weekday and the season

The output (to stdout) is seven lines weekday and the temperature in centigrade

The weekdays begin on the input weekday

The temperatures are random numbers with the range depending on the season


Spring 10 - 30 degrees  
Summer 20 - 40 degrees  
Autumn  5 - 25 degrees  (Fall is a synonym for autumn)
Winter -5 - 15 degrees


Sample Input

Thursday Winter

Sample Output


Thursday -1
Friday 3
Saturday 8
Sunday 7
Monday 10
Tuesday 10
Wednesday -1


Your program must not have identical output every time it is run with the same input
Ruby 1.8, 95 characters

#!ruby -nrdate
7.times{|i|puts (Date.parse($_)+i).strftime"%A #{"\023\004\016\016\035"[$_[-3]%5]-9+rand(21)}"}


The character escapes inside the string should be replaced by the character literals they represent.


Found a shorter way to pack the data, Ruby 1.9 would be 4 characters longer now (add .ord after $_[-3]).
112 -> 105 by stealing Joey's idea of not splitting the input.
105 -> 101. Note that the first line is actually parsed by the Ruby interpreter itself, so it even works when running the solution like echo "Thursday Winter" | ruby1.8 forecast.rb
101 -> 96. Stole Joey's idea again to just embed the temperatures into a string instead of an array.
Whoops, just noticed it should be rand(21), not rand(20).
96 -> 95. Removed unnecessary whitespace.