DEV Community

Philip Abachi
Philip Abachi

Posted on

Python 101: Ultimate Python Tutorial For Begginer

**

# Introduction

**

  • Python is a high-level, popular programming language.
  • It was created by Guido van Rossum and first released on February 20, 1991.
  • It is used for web and software development, mathematics, data analysis, AI and machine learning
  • It works on different platforms and it has simple syntax.
  • Due to its simplicity, Python is very productive it can help focus on solving developer's problem
  • The most recent version of Python is python3. Python is written in an Integrated Development Environment (IDE), such as Pycharm, VS Code, Spyder, Jupyter, Sublime Text, Thonny. Python was designed for readability and it is therefore simple to use
  • In this course we are going to learn everything you need to get started with programming in python

Installation

  • Python is available on a variety of platforms, that is Windows, Linux ans MacOS
  • Open a terminal window and type "python" to check if it is installed already. This is usually the case in most PC's and if it's not you will have to download python on a web browser
  • Go to https://www.python.org/downloads/
  • Follow the link to download either for Linux/Unix, Windows or MacOSthe latest version of python
  • Make sure to add python to path if you are using windows. Next we need to install a code editor where we write our codes. They are many including Pycharm, Jupyter, VS Code.
  • Python files are created using .py file extension ##Python Syntax
  • Python uses indentation to indicate a block of code

**

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:

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)

*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)

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)

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)