1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Learning Python: Where to start?

  1. May 14, 2012 #1
    I'll be working for most of the summer and won't be able to take classes in anything so instead I will be teaching myself a new programming language! I have experience with java already and I've heard from places around the web that Python is both fun and useful. I figure I'll give it a shot.

    Does anyone know of a good site to get started learning python? MIT has courseware for their intro to CSC class that teaches python but if there is an easier way for an amateur (I've had two semesters of java) then please point me in that direction.

    if this happens to be in the wrong section, my apologies. Thanks!

    EDIT: I'm a rising sophomore majoring in Physics. Are there different languages that would best suit my needs at this point?
     
    Last edited: May 14, 2012
  2. jcsd
  3. May 14, 2012 #2
    So you have some experience in another Object-oriented language, Java, already?

    In which case, I've heard good things about Learn Python the Hard Way, though you'll have to pay for any format other than HTML. I don't like their approach about memorizing the names of all the symbols (arbitrary conventions given to shapes), but it's still okay.
     
    Last edited: May 14, 2012
  4. May 14, 2012 #3
    I would say I'm still learning python but these have been real useful resources for me:

    http://www.scipy.org/SciPy [Broken]

    http://matplotlib.sourceforge.net/

    http://www.youtube.com/playlist?list=PL9FAE4422FA13FDE4&feature=plcp
     
    Last edited by a moderator: May 6, 2017
  5. May 14, 2012 #4
    One of the introductory CS courses on MIT OCW teaches using Python. I enjoyed it.
     
  6. May 21, 2012 #5
    In that "So You Want to Be a Physicist?" thread, he states that the two most widely used programming languages used by physicists are FORTRAN and C++.

    Although, if they're so widely used by physicists, my guess is that there are various course options to learn those languages, and that they wouldn't require you to learn them on your own, in which case there can't be any harm in expanding your knowledge and learning another programming language.

    I'm not fit to really tell you what to do, I just know that, in that specific thread written by a physicist, he pointed towards FORTRAN and C++ being beneficial to learn if you want to pursue a career in physics.

    Here's the link to the thread: https://www.physicsforums.com/showthread.php?t=240792

    I've been thinking about possibly learning C++ myself, since I'm still not entirely sure that physics is for me, so I want to experiment with computer programming and other scientific or technological endeavors that could potentially point me in the right direction.
     
  7. May 21, 2012 #6

    cgk

    User Avatar
    Science Advisor

    You generally want to know both a hard language (like C++) and a glue language (like Python). Those languages have different application domains. If you really can learn only one of them, not both, then choose Python because it will be more useful in your daily life (as non-programmer).

    I would strongly advise against learning Fortran unless you really need it, *especially* not as a first language. First: Fortran is very simple, and if you are fluent in any other procedural language (like C++), you can pick it up in one or two days (I'm not joking). Second: Fortran, as commonly practiced, is missing many essential language features (e.g., it is quite possible to find a million line Fortran application which does not have a single compound type). Not having those features from the start will prevent you from learning how to use them naturally and productively, and it will lead to very bad and counterproductive programming habits.
     
  8. May 22, 2012 #7
    Hey, just go tho the Pythong Programming website. It's really useful and gives you step-by-step directions.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook