What is the best book for learning python for physics applications?

  • Context: Python 
  • Thread starter Thread starter TheQQ
  • Start date Start date
  • Tags Tags
    Book Physics Python
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
6 replies · 14K views
TheQQ
Messages
5
Reaction score
0
Hello,

I would like to self learn python for my physics degree, but I don't really have an idea where to start. Could anyone recommend a good book out there for beginners (zero experience with programming)?

I don't want anything too comprehensive; that's for comp sci majors. I'm really just looking for a book with a focus on the application of python for physical simulations, solving equations, etc.

thanks
 
Physics news on Phys.org
I don't know of any books on the subject. If you have zero experience, you should start with learning to program. You can do stuff like code academy to learn the syntax (http://www.codecademy.com/, you won't learn how to code with these tutorials). Then you probably should work through some proper python tutorial or take a course on it if possible. When I was getting into python, I did this tutorial http://learnpythonthehardway.org/book/.
I didn't like it that much, but many people are saying it's great so you can look into it I guess. It requires you to learn basics of command line interface too.

When you know how to code, you can start looking into numpy/scipy library http://www.scipy.org/
It's probably the biggest and most widely used scientific library for python. For learning scipy you can google some material (like http://scipy-lectures.github.io/intro/index.html).

Then of course there are libraries like pygame which are nice for making little physics simulations/games (collisions, planetary systems) with some (2D) graphics.

But you really need to learn some programming first (not theory, just how to build a program), and the fastest way to learn that is writing programs.
 
  • Like
Likes   Reactions: 1 person
Thanks for the suggestions,

The book by Langtangen looks fairly interesting with good reviews on amazon so I think I'll try to start with that.
 
Last edited by a moderator: