• Python Conditional Statements

    Python Conditional Statements

    Python Conditional Statements Table Of Contents What Is Python Conditional Statement? Types Of Conditional Statement. if statements if-else statements if-elif ladder Nested statements (1) What Is Python Conditional Statements? When our program executes, it will run line by line. Suppose, you want to execute some set of codes based on some condition, you can use control flow statements. Decision-making statements in programming languages decide the direction of the flow of program execution. In the above picture, you can see that if there is water on the road, you will not walk on that path. So in python, you can also

    Read More

  • Python Operators

    Python Operators

    Python Operators Table Of Contents What Is A Python Operator? Types Of Python Operators. Arithmetic operators. Assignment operators. Comparison operators. Logical operators. Identity operators. Membership operators. Bitwise operators. (1) What Is A Python Operator? Python Operators in general are used to perform operations on different values and variables. These are standard symbols used for the purpose of logical and arithmetic operations. Operators are the pillars of a program on which the logic is built in a specific programming language. In the example below, we use the + operator to add together two values: Example a = 30 b = 40

    Read More

  • Python Data Types

    Python Data Types

    Python Data Types Table Of Contents What is a Data Type? Python Data Types. Numeric. String. Boolean. List. Tupple. Set. Dictionary (1) What Is A Data Type? A data type, in programming, is defined as the type of value that a variable is going to store. This type can be of anything like numbers, texts which are of string type, True or False values which are of Boolean types, etc. Based on the type of values stored inside the variable, we are able to perform some specific tasks upon it. Like we can add, subtract, divide and multiply integer values,

    Read More

  • Python Variables

    Python Variables

    Python Variables Table Of Contents What Is A Variable? Variable Naming Rules. Variable Declaration. Assigning A Single Value To Multiple Variables. Assigning Different Values To Multiple Variables. Getting The Data Type Of A Variable. Global And Local Variables In Python. Delete A Variable. (1) What Is A Variable? Variable is a place in the memory location, where we store our values and give it a name. Computer is having two types of memory location (Temporary Memory- RAM and Permanent Memory – ROM), variables store in the Temporary memory (RAM). In Python, We do not need to declare variables before using

    Read More

  • Python Comments

    Python Comments

    Python Comments Table Of Contents What Is Python Comment? Single Line Comments. Multiple Line Comments. (1) What Is Python Comments? Comments are descriptions that a programmer writes for a better understanding of the intent and functionality of the program. Using comments in programs makes our code more understandable. It makes the program more readable which helps us remember why certain blocks of code were written. Other than that, comments can also be used to ignore some code while testing other blocks of code. This offers a simple way to prevent the execution of some lines or write a quick pseudo-code

    Read More

  • Python Indentation

    Python Indentation

    Python Indentation Table Of Contents What Is Indentation? Examples Of Python Indentation. Rules Of Indentation. Bad Indentation Examples. (1) What Is Indentation? Most programming languages like C, C++, and Java use braces { } to define a block of code. Python, however, uses indentation. In simple terms indentation refers to adding white space before a statement. Without indentation, Python does not know which statement to execute next or which statement belongs to which block. This will lead to IndentationError. Indentation in other languages like C, C++, Java, etc., is just for readability, but in Python, the indentation is an essential

    Read More

  • Python Lines

    Python Lines

    Python Lines Table Of Contents: What Are Python Lines ? Joining Multiple Lines To Form A Single Logic. Multiple Statements On A Single Line. (1) What Are Python Lines? A Python program is divided into a number of logical lines and every logical line is terminated by the token NEWLINE. A logical line is a collection of statements, that comes under a single logic implementation. Python interpreter searches for the ‘Newline’ token to find out where logic ends. Split a Logical line into multiple physical lines using Semicolon (;) and Join multiple physical lines into one logical line using ().

    Read More

  • Python Keywords

    Python Keywords

    Python Keywords What Is Python Keywords? As we have used names to identify and call the variables, the Python language also gives names to its different functionalities. These names are reserved for Python language and we call them Python keywords. We can not use these keywords as variable names, function names, or any other identifiers. There are a total of 33 keywords present in the Python 3.7 package. Keyword List In Python? We will discuss in details , about all these keywords in other blogs.

    Read More