I love Python3 and naturally, I tend to write a lot of python code! Occasionally, I decide to try out a new way to implement something and I write a short script for it in python. Other times, i just write python when i'm bored. This repository contains all such short and interesting python scripts that do not necessarily fit into a larger project that is worthy of its own github repo.
We have all heard about the infamous ceasarcipher encryption algorithm! I personally learnt about it from one of my school programs! The basic idea is you have a message (string) and you have a shift value (int). You then shift all the characters in the message by that shift amount (shift the ASCII values from the ASCII table). This encodes the strings. The reciever can then decode the string by shifting it by the negative of the shift value! In school i learnt how to do this using Java and only limited to alphabets. This script can encode any string containing alphabets, numbers and even special characters! Feel free to tinker with it!
Finding the Square Root of a perfect square is quite easy! But have you ever tried manually finding the square root of a non-perfect square number? Its not so easy! In School we learnt about a method using a form of Division which i named DivisionRoot. Basically, check out the code to see how the algorithm has been implemented. Additionally, i have put implementations of other algorithms like NewtonRoot, BabylonRoot and also compared it with the math.sqrt function! my algorithm doesnt perform that badly!
As the name suggests, this is just an implementation of the Towers Of Hanoi using Recursion in Python3
This script contains certain patterns (to practice looping) in Python!