Python code of my Graduate project