
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
464 Views
When it is required to find yesterday, today and tomorrow’s date with respect to current date, the current time is determined, and a method is used (in built) that helps find previous day and next day’s dates.Below is a demonstration of the same −Example Live Demofrom datetime import datetime, timedelta ... Read More

AmitDiwan
572 Views
When it is required to print the pattern of the letter ‘G’ using ‘*’, a method can be defined, and nested loop can be used to iterate through the numbers and print ‘*” to form a ‘G’ pattern.Below is a demonstration of the same −Exampledef display_pattern(my_line): my_pattern="" for ... Read More

AmitDiwan
385 Views
When it is required to print the fibonacci sequence using the method of recursion, a method can be declared that calls the same method again and again until a base value is reached.Below is a demonstration of the same −Example Live Demodef fibonacci_recursion(my_val): if my_val Read More

AmitDiwan
165 Views
When it is required to get the count of unique keys for values in a list of tuple, it can be iterated over and the respective counts can be determined.Below is a demonstration of the same −Example Live Demoimport collections my_result = collections.defaultdict(int) my_list = [[('Hello', 'Hey')], [('Jane', 'Will')], [('William', ... Read More

AmitDiwan
190 Views
When it is required to count the number of bidirectional tuple pairs in a list of tuples, the list can be iterated over using nested loops, and the ‘AND’ operation is performed on the first element and result of equality between first and second element.Below is a demonstration of the ... Read More

AmitDiwan
412 Views
When it is required to get the sum of all the nodes in a Tree, a ‘Tree_structure’ class is created, methods to set a root value, and to add other values are defined. It also has a method to determine the sum of all elements of a Tree structure. Various ... Read More

AmitDiwan
219 Views
When it is required to find the count of the non leaf nodes in a Tree, a ‘Tree_structure’ class is created, methods to set a root value, and to add other values are defined. Various options are given that the user can select. Based on the user’s choice, the operation ... Read More

AmitDiwan
628 Views
When it is required to count the number of leaf nodes in a Tree, a ‘Tree_structure’ class is created, methods to add root value, and other children values are defined. Various options are given that the user can select. Based on the user’s choice, the operation is performed on the ... Read More

AmitDiwan
380 Views
When it is required to implement a queue using a stack, a queue class can be defined, where two stack instances can be defined. Different operations can be performed on the queue that are defined as methods in this class.Below is a demonstration of the same −Example Live Democlass Queue_structure: ... Read More

AmitDiwan
573 Views
When it is required to implement a stack using two queues, a ‘Stack_structure’ class is required along with a Queue_structure class. Respective methods are defined in these classes to add and delete values from the stack and queue respectively.Below is a demonstration of the same −Example Live Democlass Stack_structure: def ... Read More