2015年1月23日星期五

Week 2

Week 2 
During this week’s lecture, I learned about turtle. I was amazed when I saw the perfect square and the perfect triangle showed on the screen. It is the first time I thought about python could do a lot of things way more interesting than just get a list of students name or make dictionary. However, the class material was confused at first. I could follow the lecture in the first hour. I kept reading the code of ‘Shape’ and ‘Square’ again and again, and tried some code by myself. Then I felt a little confident. From the last week’s lecture I couldn’t figure out what a subclass is. But in this lecture I understand how to make a subclass. 

For example, the main class is ‘Shape’, the subclass is ‘Square’, in python the subclass should be written as ‘Square(Shpae)’. Also, we can use ‘raise NotImplementedError('Need a subclass’)’ in main class, and rewrite the function in subclass.

It is extremely interesting when our prof using the tory to make the move. I think this is a really good way of teaching us the new concepts. I searched online about turtle. There are a lot of material related to turtle. I am a little afraid that I cannot use turtle as skilled as we should do. But I will rewrite the ‘Shape’ and ‘Square’ python code so that I could learn the material better.


The tutorial material was as hard as usual. We need to design 3 classes in order to get the GPA of the course according to the letter grade and the numeric grade. Anyway the lecture was fun and the material was interested. 

1/23/2014

没有评论:

发表评论