Month: May 2020

Python File handling

Python main function

An every program in programming languages starts their execution of the main () function, but Python doesn’t have main function, but we can achieve functionality main function using __name__ special python variable. For every Python program python interpreter will add a special variable __name__ internally. This variable store information regarding whether the program is executed …

Python main function Read More »

Python File handling

Python Packages

The python packages mean folder or directory which represents a collection of Python modules. It is an encapsulation mechanism to group related modules into a single unit. Before understand package must need a some knowledge about Python modules. Any folder or directory contains file, is considered as a Python package. This file can be …

Python Packages Read More »

Python File handling

Python Modules

A group of functions, class and variables that are saved in a file, that file refers as Python modules. In Python each file with. By extension, is considered as a module. Python modules are used to divide a large program in sub program and divide a program according to similar function. The module is also …

Python Modules Read More »

Python File handling

Python Variables Scope

Variables scope means the accessibility of the variables in the program. This means in which part of the program allows to access those variables. Python Variables Scope Divided Into Two Types Global variables Local variables Global Variables The variables which are declared outside the all the functions are called global variables. Global variables can be …

Python Variables Scope Read More »

Python File handling

Python Anonymous Functions

Python anonymous functions means declare function without a name. The anonymous function is also called as lambda functions in Python. The main purpose of this function is just for instant use. A lambda function is useful when the function has only a single statement. A lambda function return value by default, so need to write …

Python Anonymous Functions Read More »

C Programming

C Switch Statement

In C, Switch statement is one of the decision making statement. We have seen than when multiple alternative is available to be selected we can use an if statement. When we use if statement the complexity of these program will be increased because of too many alternative condition. To solve confusion C Programming have a …

C Switch Statement Read More »

Python File handling

Python Recursive Functions

What Is Python Recursive Functions? A recursive functions means the function call itself. Python allows developer to create such type of function that call itself. At that time of creation of recursive function developer must take care of base condition that helps to exit function other that lead infinite loop not generate an appropriate result. …

Python Recursive Functions Read More »