Skip to main content

Posts

0. Introduction to Programming

What is Programming? Just like we use Hindi or English to communicate with each other, we use a programming language like Python, Java, C, C++, C# etc. to communicate with the computer. Programming is a way to instruct the computer to perform various tasks. What is python? Python is a simple and easy to understand language which feels reading simple english . This Pseudo code nature of python makes it easy to learn and understandable by beginners.  Features of Python- Easy to understand = Less development time Free and open source  High level language Portable - Works on Linux/Windows/Mac +Fun to work with Installation Python can be easily installed from  Python.org  . When you click on the download button, python can be installed right after you complete setup by executing the file for your platform.
Recent posts

3. Strings

 Strings String is a data type in python. String is a sequence of characters enclosed in quotes. We can primarily, write a string in these three ways : Single quoted strings ➡️ a = 'Aariz' Double quoted strings ➡️ b = "Aariz" Triple quoted strings ➡️ c = "'Aariz"' String Slicing A string in python can be sliced for getting a part of the string. Consider the following string: name = "Aariz"                                    ➡️ length = 5               ↑↑↑↑↑               01234                The index in a string starts from 0 to (length-1) in Python. In order to slice a string, we use the following syntax: sl = name[int_start:int_end]                       ↙️            ↘️ first index includ...

1. Modules, Comments & pip in Python

Let's write our very first python program. Create a file called hello.py and paste the below code in it: print("Hello World")                                                                  ➡️  print is a function Execute this file(.py file) by typing python hello.py on your terminal and you will see Hello World printed on the screen. Modules A module is a file containing code written by somebody else(usually) which can be imported and used in our programs.  Pip Pip is the package manager for python you can use pip to install a module on your system  ➡️  pip install numpy installs numpy module Types of modules There are two types of modules in Python 1. Built in modules             ➡️ Pre installed in python 2. External modules          ...

2. Variables and Data types in Python

  Variable A variable is the name given to a memory location in a program  For example- a = 30                                                           -  Variable = Container to store a value b = "Aariz"                                                   - Keywords   = Reserved words in Python c = 67.22                                                       - Identifiers = class/function/variable name Data Types  Primarily there are are following date types in Python- 1. Integers 2. Floating point numbers 3. Strings 4. Booleans 5. None Python is a fa...