Hey there! Sign in to join this conversationNew here? Join for free
x Turn on thread page Beta
    • Thread Starter
    Offline

    7
    ReputationRep:
    I am trying to learn python and improve, but am not really sure how to learn it and teach myself. Do any of you know any good guides or tips to help me improve? Thanks
    Offline

    20
    ReputationRep:
    go to the library. should be a 'for dummies book' in there for java, HTML 5 and probably python. probably a good start.
    Offline

    5
    ReputationRep:
    You can come to my website - set up specifically to start young learners on Python, in a context of your school subjects.
    I also record weekly code-casts that you can try to watch/follow/exercise.

    For this week we try to emulate ski-jump
    https://www.edbr.uk/wtic-ski-jumping/

    Last week it was the Valentine's theme
    https://www.edbr.uk/valentines-prese...ics-in-coding/

    Don't worry if you can't follow the whole coding. Time and persistence will help.
    Offline

    17
    ReputationRep:
    There's a great intro to Python on Codecademy (You can ignore the paid-for parts of this, but you can get going without needing to download or install anything!):
    https://www.codecademy.com/learn/learn-python

    Also, the teaching staff at MIT have released a free Python course on edX, which covers other aspects than simply the programming language itself - this also focuses on the essential problem solving skills you need to "think" like a programmer:
    https://www.edx.org/course/introduct...itx-6-00-1x-11

    Also, I don't know which tools you're using for Python (if any), but if you're using IDLE, then make sure you spend just a few minutes learning learn how to set breakpoints with the debugger so that you have an easier time diagnosing problems in your code - when you find that your code isn't doing the thing you expect, and you don't know why, then "breakpoints" can save you hours of fussing about.
    https://www.cs.uky.edu/~keen/help/de...ial/debug.html

    If you aren't using IDLE or any equivalent tool, then a good one to try out would be PyCharm (Community edition is free):
    https://www.jetbrains.com/help/pycha...t-pycharm.html
    The PyCharm intro also explains how to use the debugger.

    There's the 'official' Python tutorial, which is a good reference if you need to read up on some feature of the language and find a quick example: https://docs.python.org/3/tutorial/

    Lastly, if you find that you're running in to some particular error or problem with Python that you can't understand then try searching for that error on https://stackoverflow.com , or just paste the error into Google, and you'll almost certainly find somebody else who has found the solution to that error before.
    Offline

    3
    ReputationRep:
    Google everything you don't know. Don't give up!
    Offline

    12
    ReputationRep:
    Go onto Treehouse, they have courses for beginners. I'm going to start it myself this summer
    Offline

    8
    ReputationRep:
    1. I'd suggest a book like Beazley and then Eckel but a lot depends on what you want to do.. OOPS is not essential, neither is problem solving, design patterns or algorithms. I learned OOP because I started with Perl, and a 'good friend' suggested I start with C/ShellScript and eventually I learned Python.
    2. Decide first, what it is you want to do - programming is a tool; you'll wind up running around with multiple languages under your belt, quietly forgetting bits and pieces if you don't decide the application.
    3. The first chapter of Beazley is good - covers a bit of everything. Also pick a really good editor with autocomplete of the standard library and let me know.
    4. OOP is very different from C-style stuff - that's where classes and how to organize/design them become important - For Bio, I'd say, initially I'd just learn absolute basics (loops, switching, try/except, Exceptions, functions/methods/basic classes and 're' library). I'd ditch decorators etc .. so you'r dealing with quite a bit of Beazley..
    5. You only need basic classes/methofs because life becomes boring without the standard library - I'd code as one giant linear program and tell everyone to eff-off - just to avoid learning programming properly and decide what to actually do Biology wise
    6. Think of your brain as a sieve needing constant topup of what you've learned..
    Offline

    17
    ReputationRep:
    (Original post by veekm)
    I'd code as one giant linear program and tell everyone to eff-off - just to avoid learning programming properly and decide what to actually do Biology wise
    What a strange bit of advice. Why would you want to avoid learning programming properly? (Perhaps depending on what you mean by 'properly' anyway..) Did you mean to say something different to this?
    Offline

    8
    ReputationRep:
    The OP is a newbie.. so I'm suggesting they program /usr/bin/shutter style Useful program, HORRIBLE coding syle.

    Learning proper Python programming from Beazley is difficult - you have to think, ponder, experiment over 10-Chapters. Each data-type has it's set of methods that you need to get familiar with, all that stuff about decorators, coroutines, iterator, generator - how to organize your classes. Hugely time/memory intensive.

    With shutter/Perl that guy's written a useful thing - only a lunatic would write it that way but.. look at the libraries he's used.. there's Pango, DBus, ImageView, Encode - you have to have domain knowledge before you can start to write a program. Generally domain knowledge determines what libraries you use/pick. Biology may need 're' which is a mini-language in itself or image processing.

    Don't spend time mastering python syntax and design initially, instead figure out the Bio/Domain bit - are you doing Math/Signal-Image-Processing or it pattern matching. Is there an existing codebase (Perl?) Any DB work? Do you need a GUI?

    Then write something as a big blob. Then rewrite it using functions. Then implement it as a class.Why bother starting with a class on day-1 The avoiding bit comes when some genius programmer tells you your code looks like crap - which it does, and that you need to abstract - which you must - that's when you stick emm in functions and eventually all your functions will start to grate and you start to read up on classes and inheritance.

    If you do it without any domain expertise.. you'll think you've mastered classes, then you'll stare blankly at the editor wondering what to do with 're', you'll go off to read 're', then come back to see what problem your solving and whether you need 're' and after spending quality time with the libraries, your brain's leaked out all that stuff you read on classes.

    The problem you are solving determines class names, var names, function names or any other name - so the domain determines the vocabulary you will use in your program.
    Offline

    1
    ReputationRep:
    I second Team Treehouse, Codecademy should also be considered as well (the latter being FREE!).
    Offline

    4
    ReputationRep:
    (Original post by Biology123ABC)
    I am trying to learn python and improve, but am not really sure how to learn it and teach myself. Do any of you know any good guides or tips to help me improve? Thanks
    Well, you can use online tutorial videos or may join some online classes offering by various institutions like "Excelr Solutions"
 
 
 
Reply
Submit reply
Turn on thread page Beta
Updated: March 29, 2018
Poll
Are you going to a festival?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.