Is there anyone who is reading the book, "learn pyton the hardway" can anyone explain me its 2nd Exercise
This the ex.
That's pretty straight forward. Is there something more specific that you are having trouble with? I'm not sure that I can explain that in a clearer way, but basically it's saying you are generally going to use comments in one of two ways. Either you are going to "code in" a line comment to explain what is going on in the program or what your thought process or reasoning was when you created the routine, OR you are going to put the comment symbol in front of a line of code to disable it. This is often done during debugging. By disabling key lines you can track down the source of an error or you can try another approach without overwriting your existing code.
anything after the # in that line will be ignored. you can use the # symbol to write stuff that doesnt have anything to do with programming. EX: #penispenispenis print "not penis" would show up as: 'not penis. the first line would be ignored by python
Join our real-time social learning platform and learn together with your friends!