DEV Community

Changach-Mercy
Changach-Mercy

Posted on

Python 101: Ultimate Python Guide

Python is a widely-used programming language that was created by Guido van Rossum, and first released on February 20, 1991.Python is a multipurpose programming language, and it has applicability pretty much anywhere that uses data, mathematical computation, or lines of code.

Python usability goes beyond a basic web development and can be used for: Data science, Machine learning and Data mining. Python has been fronted as a preferred programing language due to its various advantages;

  1. Python has a huge community to support it,
  2. It's free and open source software.
  3. Simple syntax- Python coding language has an easy-to-learn syntax and uses English words.
  4. Readability-lines of code in python are easy to read

Python Installation
You can download the various versions of python through your preferred browser(preferred versions 3.8- 3.9 and 3.10 have bugs).
One can download through Pycharm with the below link

[((https://www.jetbrains.com/pycharm/download/#section=linux))]
Alternatively, one can use an online python e run from online interpreter, like you can get started from Replit
[(https://replit.com/languages/python3)]

Python Operators
Operators are used to perform operations on variables and values.
Python divides the operators in the following groups:

  • Arithmetic operators
  • Assignment operators
  • Comparison operators
  • Logical operators
  • Identity operators
  • Membership operator

Python Data Types
Data types are the classification or categorization of data items. The following are the standard data types of Python:
• Numeric
• Sequence Type
• Boolean
• Set
• Dictionary

Python Collections (Arrays)
There are several collection data types in the Python programming language:

  1. List- A list is a collection which is ordered and changeable. In Python lists are written with square brackets.

thislist = ["lemon", "lime", "avocado"]
print(thislist)

  1. *Tuple *-A tuple is a collection which is ordered and unchangeable. In Python tuples are written with round brackets
    thistuple = ("lemon", "lime", "avocado")
    print(thistuple)

  2. Dictionary-A dictionary is a collection which is unordered, changeable and indexed and written with curly brackets, and they have keys and values.
    thisdict = {"brand": "Gucci", "model": "Prada", "year": 2019}
    print(thisdict)

  3. Functions-A function is a block of code that runs when it is called.Function is defined with the def keyword.

def Year():
print('2022')

Year() is calls the function to execute.

In summary, this is what I've learnt in week 1 Python Bootcamp at Lux Academy. Looking forward to building my skills in programming with python.

Top comments (0)