Difference between revisions of "Python"

From Coder Merlin
m (Editorial review and minor corrections)
Line 1: Line 1:
== What is Python? ==
== What is Python? ==
Python is a '''high-level''', general purpose '''programming language'''. Here is some quick information about Python:
Python is a '''high-level''', general-purpose '''programming language'''. Here is some quick information about Python:
* Python is '''open source'''
* Python is '''open source'''
* Python is '''free''' and '''on multiple platforms'''
* Python is '''free''' and '''on multiple platforms'''
* Python is '''easy''' to pick up (a great beginner programming language)
* Python is '''easy''' to pick up (a great beginner programming language)
* There are '''thousands''' of online tutorials on Python
* '''Thousands''' of online tutorials on Python are available
* Python has many third party applications
* Python has many third-party applications
* Supports '''different''' types of programming such as object-oriented, structured and functional programming
* Supports '''different''' types of programming such as object-oriented, structured, and functional programming
* Python is '''updated''' often
* Python is '''updated''' often
* Python is an '''interpreted''' programming language
* Python is an '''interpreted''' programming language


Some great websites to use when programming in Python is the [https://docs.python.org/3/ official documentation], and [https://www.w3schools.com/python/ W3schools] if you are looking for '''coding references''' or '''tutorials'''.
If you are looking for '''coding references''' or '''tutorials''', some great websites to use when programming in Python are the [https://docs.python.org/3/ official documentation] and [https://www.w3schools.com/python/ W3schools].


== History of Python ==
== History of Python ==
Line 18: Line 18:
The zen of python
The zen of python


<small>
# Beautiful is better than ugly.
# Beautiful is better than ugly.
# Explicit is better than implicit.
# Explicit is better than implicit.
Line 31: Line 30:
# Unless explicitly silenced.
# Unless explicitly silenced.
# In the face of ambiguity, refuse the temptation to guess.
# In the face of ambiguity, refuse the temptation to guess.
# There should be one– and preferably only one –obvious way to do it.
# 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.
# Although that way might not be obvious at first unless you're Dutch.
# Now is better than never.
# Now is better than never.
# Although never is often better than right now.
# Although never is often better than right now.
# If the implementation is hard to explain, it's a bad idea.
# 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.
# If the implementation is easy to explain, it might be a good idea.
# Namespaces are one honking great idea – let's do more of those!
# Namespaces are one honking great idea—let's do more of those!
</small>
 
You can see this by:
You can see this by:
<code>import this</code>
<code>import this</code>
Line 44: Line 43:
== Pros of Python ==
== Pros of Python ==
* Python is very easy to learn and is a great learning tool
* Python is very easy to learn and is a great learning tool
* You can use python to branch off to other languages
* You can use Python to branch off to other languages
* It has many use cases
* It has many use cases
# Web development (Flask)
# Web development (Flask)

Revision as of 06:54, 4 December 2022

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

What is Python?[edit]

Python is a high-level, general-purpose programming language. Here is some quick information about Python:

  • Python is open source
  • Python is free and on multiple platforms
  • Python is easy to pick up (a great beginner programming language)
  • Thousands of online tutorials on Python are available
  • Python has many third-party applications
  • Supports different types of programming such as object-oriented, structured, and functional programming
  • Python is updated often
  • Python is an interpreted programming language

If you are looking for coding references or tutorials, some great websites to use when programming in Python are the official documentation and W3schools.

History of Python[edit]

Guido van Rossum released Python on February 20, 1991. Contrary to common belief, Python is named after an old comedy show called Monty Python's Flying Circus, not after the type of snake. Python 2.0 was released in October of 2000, and Python 3.0 was released in December of 2008. In the time in which this was written, Python is currently in 3.11.0.

Principles of Python[edit]

The zen of python

  1. Beautiful is better than ugly.
  2. Explicit is better than implicit.
  3. Simple is better than complex.
  4. Complex is better than complicated.
  5. Flat is better than nested.
  6. Sparse is better than dense.
  7. Readability counts.
  8. Special cases aren't special enough to break the rules.
  9. Although practicality beats purity.
  10. Errors should never pass silently.
  11. Unless explicitly silenced.
  12. In the face of ambiguity, refuse the temptation to guess.
  13. There should be one—and preferably only one—obvious way to do it.
  14. Although that way might not be obvious at first unless you're Dutch.
  15. Now is better than never.
  16. Although never is often better than right now.
  17. If the implementation is hard to explain, it's a bad idea.
  18. If the implementation is easy to explain, it might be a good idea.
  19. Namespaces are one honking great idea—let's do more of those!

You can see this by: import this

Pros of Python[edit]

  • Python is very easy to learn and is a great learning tool
  • You can use Python to branch off to other languages
  • It has many use cases
  1. Web development (Flask)
  2. Game development (pygame)
  3. Bot development (discord.py)

Cons of Python[edit]

  • Python is slower compared to other programming languages

References[edit]

Python.org

Python Documentation

Wikipedia

Code Academy

W3Schools

Pythoninstitute.org

Zen Of Python Wiki