How to create a simple password saver in python

In this example program, we are building a python program to safely store and retrieve the password. It stores passwords in a file. Passwords are totally secured. This program also contains a master password to use the application. Option available in the program is you can get previously-stored password. You can also add your new password. You can also check for all stored usernames. So let’s start writing Python Program to build a Simple Password Saver....

May 5, 2020 · 7 min · Rahul Rajput

Tax calculating program in Python

This program is used to calculate tax in the Python programming language. This Tax calculating algorithm is very in this program we can improve this algorithm a lot. Note: this is a very basic implementation of tax calculation. One should not use this to calculate the real tax to submit in real life, this is just a simulator for practice purposes. Algorithm First, we are asking for user input to get the total income and total saving, then we are checking for total taxable income by reducing savings from total_income....

February 12, 2020 · 2 min · Rahul Rajput

Bubble sort code in Python

Bubble sort is the simplest Sorting algorithm available. It works by repeatedly swapping the adjacent or neighbor element if they are in the wrong order. Working Actually in the first-pass bubble sort sets the largest element to its position, in the second pass algorithm sets the second largest element this continues till the list or array is not finally sorted. Here is the example image. To work with the algorithm you first have to understand what is swapping and how it is done....

November 17, 2019 · 2 min · Rahul Rajput

Python program to display Fibonacci using recursion

TLDR; In post we are going to learn how to create a fibonacci series program using recursion in python. If you are looking for code only, you can find it Here Fibonacci series Explanation The Fibonacci series is the special sequence of numbers in which next number is calculated using a formulae. first two numbers are default 0 and 1. Formula is n2 = n1 + n0 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …...

April 27, 2019 · 3 min · Rahul Rajput

Blackjack Console game program in Python

Blackjack Game Blackjack is the American variant of a globally popular banking game known as Twenty-One. Game Rules One player have to make the total sum of his hands lower than 21 to win while another player has the total sum is 21 or more, Cards greater than or equal to 10 are considered as the 10, Ace can be considered as the 11 or 1 depending on conditions. Person who scored less will be announced as winner, considering there must be one person whose score should be more than 21....

December 26, 2018 · 3 min · Rahul Rajput

XML parsing in Python3 (working with ElementTree)

XML : XML stands for the eXtensible Markup Language. It was designed for data transport and data storage. It was designed for both Human and machine readable. That’s enough for the introduction. Let’s start working. First of all the XML file that we are working on. <messages> <note id="501"> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>This is code in cafe</body> </note> <note id="502"> <to>Jani</to> <from>Tove</from> <heading>Re: Reminder</heading> <body>I will not</body> </note> </messages> We are using this file as an example XML file, name this file as the “example....

December 13, 2018 · 2 min · Rahul Rajput

Split a string in C/C++ and Python

Splitting a string by some delimiter is a very common task in programmers day to day life. For example, we have an email address, and we want to extract email host which is part after @ in email address, example@gmail.com. After splitting this email address by “@”, there will be two strings “example”, “gmail.com”. Use case of string splitting contains, tokenizing things in compilers, extracting relevant data with Web crawlers etc....

December 11, 2018 · 1 min · Rahul Rajput