Wednesday, 19 April 2017
Lesson 3, 26/1/17
This being the third lesson of our computing module, we continue to learn about some of the basics of Python. We learnt about defining a function, so that when we want to change the value of a variable, we do not have to change the whole code and only need to change the variable present in the function line itself. In my opinion, this is a very useful function as it allows us to save a lot of trouble and time. However, I find it a bit confusing at first with all the different other information that we need to define such as the parameters. With more practice, I finally understand the whole flow of the function and found that it was actually quite similar to math actually. After this, we proceeded to learn about the [start:stop:step] function. It can be use to pick out the letters we want, leaving others behind. At first, I got nearly all the practice questions wrong as I keep forgetting in this function, the counting starts from zero and not one. We were also given the leap year question to try at home so as to practice the if else function that we learnt. Overall, I realised that in computing, certain rules have already been set down for us to follow and no matter how illogical or weird it is, we will still need to follow it as that is how the Python language is written in.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment