On 08/04/16 17:44, Jason Willis wrote: > there are hard-coded content dependant entries. I solved this by changing > all instances of the word "elite" and changing them to "standard" and the > program works!
Glad you got it working. > I agree with you that taking a few hours to learn python > would go a long way. I believe by doing things like this that this is > exactly what I am doing. I don't know that you are. You are reading and playing with other people's code. But you don't know if what you are reading is good or bad code. For example the code you just posted is not that great it (unnecessarily) mixes two different techniques for processing the text and has several awkward stylistic things going on. Also do you know what classes are for and when/how they should be used? In the code example you sent there are two classes and two functions, but why? And is that a good idea? Just because something gives you the answer you expect today does not mean it will tomorrow if it is not properly designed. How do you know when the code you modify is well designed unless you know what it all does? How will you fix it if/when it breaks? > I don't know if it's the materials I'm using or > what but learning from a book is not helping me much. There are many online tutorials (see below for mine) but there are also videos galore on Youtube/Vimeo etc. I personally like the ShowMeDo series: http://showmedo.com/videos/python And there are interactive code schools online too that many find more inspiring than reading books. Here's one you might try: http://www.learnpython.org/ But there are several others. Don't get me wrong, reading and playing code is an important part of learning to code. But even more important is creating your own code from scratch. Only then are you forced to confront what each and every line does and thus be sure you understand it. And the great thing about Python is you can get up to a useful standard with literally a few (<10?) hours of reading/practising. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
