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
Click For Summary

Discussion Overview

The discussion centers around recommendations for books to learn Python specifically for applications in physics, particularly for beginners with no prior programming experience. Participants explore various resources that focus on physical simulations and solving equations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant seeks a beginner-friendly book focused on Python applications in physics without overwhelming technical depth.
  • Another participant suggests starting with general programming resources like Codecademy and recommends the tutorial "Learn Python the Hard Way," although they express mixed feelings about it.
  • Participants mention the importance of learning libraries such as NumPy and SciPy for scientific computing in Python.
  • Several participants reference a specific book by Langtangen, noting its good reviews and suitability for physics applications.
  • One participant highly recommends "Computational Physics" by Mark Newman, highlighting its focus on Python for physics students and the availability of free chapters online.
  • Another participant echoes the recommendation for Newman's book, emphasizing its inclusion of modeling and animations, which they find particularly appealing.

Areas of Agreement / Disagreement

Participants generally agree on the need for resources that cater to beginners in programming while focusing on physics applications. However, there are multiple suggestions for different books and resources, indicating no consensus on a single best option.

Contextual Notes

Some participants emphasize the necessity of foundational programming skills before diving into physics applications, suggesting a potential gap in the discussion regarding the prerequisites for effectively using the recommended resources.

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
 
Technology 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:

Similar threads

Replies
6
Views
3K
Replies
6
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 43 ·
2
Replies
43
Views
7K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K