Live data from Hacker News

Python Practice Book

anandology.com

21–30 of 37 posts

Re: Python Practice Book

#21
post #6

Ever since completing the Codeacademy Python course, I've been looking for simple but practical python projects that can help me learn to apply my skills. But so far the projects I found have been either too difficult or too simple (textbook like). I wonder if there is a more structured project-based learning material out there? Any suggestions?

I would recommend Learn Code the hard way series http://learnpythonthehardway.org/book/ http://learncodethehardway.org/ Its pretty good!

Re: Python Practice Book

#22
post #6

Ever since completing the Codeacademy Python course, I've been looking for simple but practical python projects that can help me learn to apply my skills. But so far the projects I found have been either too difficult or too simple (textbook like). I wonder if there is a more structured project-based learning material out there? Any suggestions?

For Ruby, I enjoyed http://rubykoans.com . There is a python port (which I haven't tried) at https://github.com/gregmalcolm/python_koans .

Re: Python Practice Book

#23
post #6

Ever since completing the Codeacademy Python course, I've been looking for simple but practical python projects that can help me learn to apply my skills. But so far the projects I found have been either too difficult or too simple (textbook like). I wonder if there is a more structured project-based learning material out there? Any suggestions?

What sort of projects do you have in mind? I say try to tackle one of them and look for answers to your questions along the way.

Re: Python Practice Book

#25
post #14
post #11

Earlier quoted context omitted.

You should really pick something you care about and solve a problem in that area. You will be more motivated, you will learn faster and you choose the complexity!

Problem is what I want to build is far more complex than what I can build right now, need to take baby steps ;)

My suggestion would be to try doing it anyway and see how far you get. Even if it's some type of machine learning / AI thing, you might be able to do something like throw your data Alchemy ( demo: http://www.alchemyapi.com/products/demo/alchemylanguage/ ) and have it do the "hard part".

You'll learn a lot along the way and you'll then know exactly what you need to focus on more if it totally doesn't work, but you'll likely find enough success in whatever it is that you'll be very motivated to build v2 learning from all your mistakes along the way :)

Re: Python Practice Book

#26
post #5

Hmm, noticed a few mistakes in the Getting Started section, both code, grammar and spelling. Where can we submit issues?

...and I'm surprised there's a whole section on using recursion in Python, considering Python guards against recursion depth. (tail recursion is especially applicable here). The author seems to have a solid understanding of Python, so I'm a little confused.

In general, if you use recursion in python, you're gonna have a bad time. Better to use an iterator (which is usually more memory efficient anyway because you're not slurping up the whole thing...).

Of course, you can always hack it and sys.setrecursionlimit, but WHY WOULD YOU DO THIS. https://docs.python.org/2/library/sys.html#sys.setrecursionl...

Re: Python Practice Book

#27
post #6

Ever since completing the Codeacademy Python course, I've been looking for simple but practical python projects that can help me learn to apply my skills. But so far the projects I found have been either too difficult or too simple (textbook like). I wonder if there is a more structured project-based learning material out there? Any suggestions?

https://github.com/aosabook/500lines

This is a collection of real applications that are written in 500 lines or less. The goal is to teach python through real projects that are not too complicated to understand.

Hope this helps.

Re: Python Practice Book

#28
post #3

FYI: It's Python 2, teaching Python 2 syntax. Given the state of the whole 2 vs. 3 debate, I'm always surprised that libaries and books don't post their requirements or used versions more prominently.

Most of the writing are Python 2 and 3 compatible (sure the print statement is enough to throw Python 3 off) and this was written back in 2012 when Python 2 was still the center of the community. Maybe the author thinks writing down the interpreter (Python 2.7.1) on the first chapter is good enough. Also, this was prepared for a training if you read the side. So students who took the author's training probably knew it was for Python 2.

Although I do spot a couple really "non-standard" practice, for example, the classes still using the old Python 2 syntax:

class Name: vs class Name(object):

Re: Python Practice Book

#29
post #6

Ever since completing the Codeacademy Python course, I've been looking for simple but practical python projects that can help me learn to apply my skills. But so far the projects I found have been either too difficult or too simple (textbook like). I wonder if there is a more structured project-based learning material out there? Any suggestions?

Just build something for yourself. Something complicated but not too complicated. Best way to learn in my opinion.
Post reply on HN