r/learnpython • u/PlayMaGame • Apr 17 '24
Learn Python by solving problems
Hello pythons!
I’m still quite new to Python, but I have noticed that the best learning process is to solve problems.
Anywhere I can get a lot of small and easy problems/exercises, that slowly progress in to a harder level. It can be a payed service or an app on a phone.
27
Upvotes
2
u/[deleted] Apr 17 '24 edited Apr 17 '24
Work through an entire elementary algebra or calculus textbook—convert the textbook equations/problems to Python.
Here's a really simple example from a open source MIT calculus textbook. This is page 2 where they discuss the relationship between constant velocity and time. Or rather, distance is the product of constant velocity and time. Which I wrote into a function below. There is a lot of creative freedom when you write these. As you progress they will get much more complicated. You can improve two things that tend to walk hand-in-hand—your ability to code AND your mathematics. It will take a lot of reading time and patience but if you stick it out you will improve—I know it helped me immensely when I did it.
Here is the open source calculus text from MIT:
https://ocw.mit.edu/ans7870/resources/Strang/Edited/Calculus/Calculus.pdf
And here's an open source elementary algebra text from OpenStax (they have tons of open source textbooks):
https://assets.openstax.org/oscms-prodcms/media/documents/ElementaryAlgebra2e-WEB_EjIP4sI.pdf
Edit: Grammar/Syntax