by lutusp · 14y ago · 0 comments
Two things:
1. Fedora and related distribution users will want to say "yum -y install python" instead.
2. But it's hard to imagine a distribution that doesn't have Python installed by default, because so many Linux system utilities are written in Python.
Another quote: "Alternatively, you can just start hacking away and use StackOverflow to fill in any of the gaps in your knowledge."
Yes, good suggestion, but there's always the searchable online Python documentation:
And if you're offline for any amount of time, the documentation can be downloaded:
http://docs.python.org/download.html (2.x)
http://docs.python.org/py3k/download.html (3.x)
Python has some amazing libraries -- even symbolic algebra (what Mathematica does):
from sympy import *
x,a,b,c = var('x a b c')
pprint(solve(a * x**2 + b * x + c,x), use_unicode=False)
The result: _____________ / _____________\
/ 2 | / 2 |
-b + \/ -4*a*c + b -\b + \/ -4*a*c + b /
[---------------------, -----------------------]
2*a 2*a
The Unicode output is, of course, much nicer:To enable that, run:
%load_ext sympyprinting ⎡ ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽ ⎛ ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎞⎤
⎢ ╱ 2 ⎜ ╱ 2 ⎟⎥
⎢-b + ╲╱ -4⋅a⋅c + b -⎝b + ╲╱ -4⋅a⋅c + b ⎠⎥
⎢─────────────────────, ───────────────────────⎥
⎣ 2⋅a 2⋅a ⎦