Skip to main content

Posts

Showing posts from January, 2021

Basic Stocks Graph Plotter In Python

  Plotting Graphs in Python Python offers a wide range of graphs that can be plotted using the library  Matplotlib.  We can use the function Pyplot  of Matplotlib to visualize data in many forms like Line charts, Bar charts, Histograms, Pie charts and many more. Today we will make a program to draw Line Charts for our Stock data in Python. This post is in continuation of our previous post where we explained how to collect and store daily stocks data in your database, which you can go over here:  Stock Data Collection in Python . We are going to use the stock data collected from the database we had created there, to get a peek at how a particular stock is performing. Skip to the end if you would like to get the free code! Let's get started! Modules Required As mentioned earlier, we are going to work with matplotlib , specifically with the function matplotlib.pyplot . We will also use mysql.connector to connect Python with MySQL. Last but not the least, mysql.con...

English Dictionary With Python And Tkinter!

English Dictionary on Python Have you ever tried to read from the small Oxford Dictionaries? Those small yet bulky books have thousands of words cramped on a page the length of your finger! And on top of that, not to forget the hassle of flipping across the pages, searching for your word, God knows where is hiding on which page! Nowadays though, hardly does anyone ever use the classic dictionaries. With the access of technology on our fingertips, one tap on Google, and you would be on with your way.  But how about making a program of your own which can do the same for you? Sounds interesting? Such a program can enable you to run it and keep it opened, while you are reading a book, so that you can search the definition of a new word you encountered. What if you are writing a book, perhaps a report? You know what you are supposed to write, but you choose to get a word for it, so that you sound professional. So you just search for a short definition and the program find the word with ...

Stock Market Recorder: Stock Market Data collection using Python

  Stock Market Data Collecting Program You must have heard of stocks here and there, sometimes its on the television, some day a stock crashes, or a stock surges, it has become a star of the show when it comes to finance in recent times. Huge companies involving small investors like you and me who are willing to invest our money in their company for a tiny, tiny, tiny share in return for hopeful profits is very common nowadays. If you are one of those people who have a keen interest in stocks, then you must have certainly used one of the apps on your phone which tells you the price of the stock on that day, the company's market capital, trading value, trading quantity and what not. Apart from the financial point of view, its fun when you invest a fraction of your pocket money on these and see them up by 0.01 the next day. It makes you feel like you are destined to be the next Warren Buffet. Some people actually make a living out of it. They watch the stocks wherever it goes. But th...

Simple Program for calculating Permutations and Combinations

Permutations and Combinations If you are a 12th grader like me, you would surely agree that the chapter 'Permutations and Combinations' of Mathematics is easily one of the most heinous chapters. It has straightforward formulas for permutations and combinations, but it is the calculation that gets to us. Generally questions from this chapter are pretty easy if you get the logic, but sometimes the expression involves pretty large numbers and it can get messy. Now, that is something your normal calculator can do, can it? So lets leave that for our pet Python. The Code This is a very simple program with just the logic, but I shall explain the code part by part. Skip to the end if you would like to download the python file. No strings attached. Ok, so I'd like the code to run as long as I want in the command prompt. Inputting the expression as exp , we take an empty list to store each digit of the expression so as to seperate the numbers from the letter:      the variable exp_...