Recursive Functions A function that calls itself is known as Recursive Function. Ex: factorial(3)=3*factorial(2) =3*2*factorial(1) =3*2*1*factorial(0) =3*2*1*1 =6 factorial(n)= nfactorial(n-1) The main advantages of recursive functions are: We can reduce length of the code and improves readability We can solve complex problems very easily. Q. Write a Python Function toContinue Reading

FUNCTIONS If a group of statements is repeatedly required then it is not recommended to write these statements every timeseparately.We have to define these statements as a single unit and we can call that unit any number of times based on our requirement without rewriting. This unit is nothing butContinue Reading

Dictionary Data Structure We can use List, Tuple and Set to represent a group of individual objects as a single entity. If we want to represent a group of objects as key-value pairs then we should go for Dictionary. Ex:rollno—-namephone number–addressipaddress—domain name Duplicate keys are not allowed but values canContinue Reading

Set  Data Structure If we want to represent a group of unique values as a single entity then we should go for set. Duplicates are not allowed. Insertion order is not preserved. But we can sort the elements. Indexing and slicing not allowed for the set. Heterogeneous elements are allowed.Continue Reading

Tuple is exactly same as List except that it is immutable. i.e once we creates Tuple object,we cannot perform any changes in that object. Hence Tuple is Read Only version of List. If our data is fixed and never changes then we should go for Tuple. Insertion Order is preservedContinue Reading

If we want to represent a group of individual objects as a single entity where insertion order preserved and duplicates are allowed, then we should go for List. insertion order preserved. duplicate objects are allowed heterogeneous objects are allowed. List is dynamic because based on our requirement we can increaseContinue Reading

String Data Type The most commonly used object in any project and in any programming language is String only.Hence we should aware complete information about String data type. What is String? Any sequence of characters within either single quotes or double quotes is considered as a String. Syntax: s=’seedgroup’ s=”seedgroup”Continue Reading

Data Types Data Type represent the type of data present inside a variable. In Python we are not required to specify the type explicitly. Based on value provided,the type will be assigned automatically.Hence Python is Dynamically Typed Language. Python contains the following inbuilt data types int float complex bool strContinue Reading

What are Python Variables? A variable is a container for a value. It can be assigned a name, you can use it to refer to it later in the program. Based on the value assigned, the interpreter decides its data type. You can always store a different type in aContinue Reading

What is Python Syntax? The term syntax is referred to a set of rules and principles that describes the structure of a language. The Python syntax defines all the set of rules that are used to create sentences in Python programming. For example –  we have to learn grammar when we wantContinue Reading