Blog
Loops are used to repeat a block of code. Being able to have your program repeatedly execute a block of code is one of the most basic but useful tasks in programming like C, C++ , Java, Python, .Net etc. There are 3 sections of Loop: Variable initialization.( e.g int x=0; ) condition( e.g while( […]
Definition Tuple and List are used to store data in Python Language. Tuple: A tuple is a collection of values and it is declared using parentheses. However, we can also use a tuple packing to do the same, and unpacking to assign its values to a sequence. Lists: Unlike in C++, we don’t have arrays to work […]
Pointers allow you to refer to the same space in memory from multiple locations. They need because there are so many advantages: To dynamic allocate in your memory. This means that you can update memory in one location and the change can be seen from another location in your program. You will also save space […]
Data structures is a way of organizing data items that consider not only the elements stored but also the relationship to each other. They are building blocks of the program. They specify 3 things: Organizations of data Accessing methods Degree of associatively There are various types of data structures, generally built upon simpler primitive data types. […]
The simplest data structure in Python and is used to store a list of values. Lists are collections of items (strings, integers, or even other lists). Each item in the list has an assigned index value. Lists are enclosed in [ ] Each item in a list is separated by a comma Unlike strings, lists […]
Array is collection of more than one data at same location of same type. Syntax: data type name[size]; This will create memory of specified size-data. For example, an array containing 4 integer values of type int called rn could be represented as: int rn[4]; 3 2 1 0 In array memory always start from 0. Initializing arrays By default, […]