Why Python#
Python is a popular programming language for scientific computing due to its versatility, ease of use, and extensive library ecosystem. Here are some reasons to use Python for scientific computing:
Versatile: Python is a general-purpose programming language that can be used for a wide variety of tasks, including scientific computing, data analysis, and machine learning.
Easy to use: Python is known for its simple syntax and easy-to-learn nature, making it a good choice for beginners and experts alike.
Extensive library ecosystem: Python has a large and active community that has developed a wide range of libraries and tools for scientific computing, including NumPy, SciPy, Matplotlib, and Pandas.
Cross-platform: Python is cross-platform, meaning that it can be run on Windows, Mac, and Linux operating systems.
Open-source: Python is open-source and free to use, making it a cost-effective option for scientific computing.
Overall, Python is a powerful and versatile programming language that is well-suited for scientific computing. Its ease of use, extensive library ecosystem, and cross-platform compatibility make it a popular choice among scientists and researchers.
The official website#
Play around#
Try Online Python to play around with Python before complicated installtion.
Hello world#
This is probably the simplest hello world case among the most popular programming languages.
>>> print("Hello world!")
Hello world!
The Zen of Python#
See https://peps.python.org/pep-0020/#the-zen-of-python.
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!