Lists

Lists in Python We were introduced to the list data type in an earlier blog, and in this blog, we will explore the different ways to use a list. Consider the following example: list_variable = [“Python”, “Dynamically Typed”, “Programming Language”] Accessing items in a List To select an item from the list you simply add…

String

Strings in Python In the previous blog Data Types, we explored Strings in Python, and in this blog let’s dig a bit deeper into strings and what we can do with them. A string in Python is an array (or list) of characters, and in Python, a single character is still considered as a string…

Data Types

Data Types We explored the numeric data types when we talked about numbers in Python. However, there is a whole range of data types that we can use in Python, and in this blog, we’ll explore some of the most commonly used data types. What exactly is a data type? It refers to the different…

Input and Output

Input Let’s write a program that depends on a value provided by the user. To take input from the user, Python provides us with the “input()” function which halts a program till a user provides input. user_name = input(“Enter your name: “) print(“Welcome to Verification Master,”, user_name) The input() function has a parameter called “prompt”,…

Modules and Function

Functions Previously, we discussed the basic idea of a function. In this blog, we will learn in-depth about functions and how to create them. FACT: We have been using a function consistently since the first blog, and that is the ‘print()’ function which to be specific is one of Python’s built-in functions. Functions are a…

Variables

Comments Before we begin let us consider comments in Python. You must have noticed how I used the ‘#’ to convey certain information. When Python sees a ‘#’ it skips that line or part of code. We use comments to convey some information to those who read our code. # This variable was obtained from…

Operators, Relational and Logical Opertaors

Operators We were often asked by our teachers in younger classes what is the sum/difference of two numbers and as we grew up, we were asked logical concepts such as is 100 > 99? This is the foundation of programming; we manipulate all these logical expressions using operators, how operands relate to each other, and…

Math Functions

Math Module A Python module that provides access to mathematical functions. In other words, it is a library that we can bring in, to use functions defined within it. If you do not know what a function is, simply put it is a block of code that can be invoked at any time without having…

Numbers

Types of Numbers We are well aware of different types of numbers, such as integers, real numbers, decimals, whole numbers, etc. In Python, we have 3 different numeric types to work with. They are integers (referred to as int), floating-point numbers (referred to as float), and complex numbers. Integers are the standard numbers we use…

Introduction to Python

Getting Started with Python Python is such an interesting language to learn and I know you are excited but before we get started, let’s have a quick discussion of what exactly is Python. Python is a dynamically typed language that was created with code-readability in mind. Too much? Let’s break it down. Let us take…