Monday, 12 November 2012

The weekly post: Nov 12, 2012

Last week in 236 was the dreaded test week... I had kept telling myself to study early on so that I wouldn't be overcome with it at the last minute, but as usual I put off studying to do other things. By the night before I barely studied anything that was potentially going to be on the test, so I just redid some of the tutorial questions. I only managed to get through two tutorials and a bit of the textbook before I went to sleep. A funny thing is that I had convinced myself that pre and post condition weren't going to be on the test... but I was wrong. When I got the test the first question was about pre and post condition, and the second was about using the Master Theorem (which isn't too hard), so I finished the second question within five or ten minutes and dedicated the rest of my time to figuring out the first question.

For the first question, it was about a recursive function that takes two parameters x and y, and returns the value of x^y. All I really knew about the first question was that the precondition has to lead to termination and the postcondition, so I used complete induction to show that the precondition led to termination when y was 0, 1, and an even or odd number. I personally didn't think the first question was going to go well but by the time I finished my proof it seemed pretty solid. Obviously since I didn't actually study the pre and post condition I may have left out some details but overall it wasn't so bad.

After that I left lecture early just because 236 was my last test for the whole period of midterms I was having and I felt like I needed to take a break. I'm pretty excited to see how my test turned out, since I went into with the preparing for the worst but came out of it pretty confident in myself.

No comments:

Post a Comment