Skip to main content

Posts

Things you must know before coding

wanna keen to learn to code but still confused about where to start ? Don't worry you are at the right blog, I'll be sharing from very basic concepts of coding. weather you have a technical background or not it doesn't matter just stay tuned with my blog, I can bet within a couple of days you will be able to write your own code and with weeks you will start thinking about logic how to solve any problem. Everything you need to know about programming  Programming is one of the top leading jobs in the current market, and it's growing every day. It's becoming more and more crucial to have a programmer in your company. And if you take into account that all the biggest companies in the world (Facebook, Twitter, Amazon etc.) are tied to programming, you'll understand the importance of it. That's why we'll try to teach you everything you need to know about programming.Basically, programming is defined as a process of developing and implementing various sets of i
Recent posts

Files and exception in Python

Files and Exception Python provides two very important features to handle any unexpected error in your Python programs and to add debugging capabilities in them − Exception Handling  − This would be covered in this tutorial. Here is a list standard Exceptions available in Python: Standard Exceptions. Assertions  − This would be covered in Assertions in Python List of Standard Exceptions − Sr.No. Exception Name & Description 1 Exception Base class for all exceptions 2 StopIteration Raised when the next() method of an iterator does not point to any object. 3 SystemExit Raised by the sys.exit() function. 4 StandardError Base class for all built-in exceptions except StopIteration and SystemExit. 5 ArithmeticError Base class for all errors that occur for numeric calculation. 6 OverflowError Raised when a calculation exceeds maximum limit for a numeric type. 7 FloatingPointError Raised when a floating point calculation fails. 8 ZeroDivisionError Raised when division or modulo by zero tak

Basics of Tkinter

  Introduction to GUI With Tkinter in Python In this tutorial, we are going to learn how to create GUI apps in Python. You'll also learn about all the elements needed to develop GUI apps in Python. Introduction Most of you write a code and run it in a command-line terminal or an IDE (Integrated Development Environment), and the code produces an output based on what you expect out of it either on the terminal or on the IDE itself. However, what if you want your system to have a fancy looking user-interface or maybe your application (use-case) requires you to have a GUI. GUI is nothing but a desktop app that provides you with an interface that helps you to interact with the computers and enriches your experience of giving a command (command-line input) to your code. They are used to perform different tasks in desktops, laptops, and other electronic devices, etc. Some of the applications where the power of GUI is utilized are: Creating a Calculator which would have a user-interface an

Dynamic programming in python

  What is Dynamic Programming? Dynamic programming is a problem-solving technique for resolving complex problems by recursively breaking them up into sub-problems, which are then each solved individually. Dynamic programming optimizes recursive programming and saves us the time of re-computing inputs later. Why is Dynamic Programming efficient? Recursion vs. DP If the two are so closely entwined, why is dynamic programming favored whenever possible? This is because brute force recursive programs often repeat work when faced with overlapping steps, spending unneeded time and resources in the process. Dynamic programming solves this issue by ensuring each identical step is only completed once, storing that step’s results in a collector such as a hash table or an array to call whenever it’s needed again. In doing so, dynamic programming allows for less repeated work and therefore better runtime efficiency. Dynamic Programming Examples Bottom-Up Dynamic Programming Not all dynamic solution

Sorting in python

Sorting refers to arranging data in a particular format. Sorting algorithm specifies the way to arrange data in a particular order. Most common orders are in numerical or lexicographical order. The importance of sorting lies in the fact that data searching can be optimized to a very high level, if data is stored in a sorted manner. Sorting is also used to represent data in more readable formats. Below we see five such implementations of sorting in python. Bubble Sort Merge Sort Insertion Sort Shell Sort Selection Sort Bubble Sort It is a comparison-based algorithm in which each pair of adjacent elements is compared and the elements are swapped if they are not in order. def bubblesort ( list ): # Swap the elements to arrange in order for iter_num in range ( len ( list )- 1 , 0 ,- 1 ): for idx in range ( iter_num ): if list [ idx ]> list [ idx + 1 ]: temp = list [ idx ] list [ idx ] = list [ idx + 1 ]