Skip to content

Instantly share code, notes, and snippets.

View Professor-Sathish's full-sized avatar

ProfSathishR Professor-Sathish

  • http://professor-sathish-academy.business.site/
  • Coimbatore
  • X @ProfSathish
View GitHub Profile
@Professor-Sathish
Professor-Sathish / Arithematic_operators.py
Created October 30, 2023 06:48
Operators in python by SATHISH 902209
n1=10
n2=20
print(f"arithmatic operation n1+n2 result is {n1+n2}")
@Professor-Sathish
Professor-Sathish / MP1.md
Last active September 8, 2023 02:09
Mini Projects for Rythmos Training

Scenario: Building a Natural Language Chatbot

Step 1: Project Setup

  • Begin by creating a new Python project directory.
  • Inside the directory, create a Python file (e.g., chatbot.py) to house your chatbot code.

Step 2: Install NLTK

  • Install the Natural Language Toolkit (NLTK) library using pip:
    pip install nltk
@Professor-Sathish
Professor-Sathish / ex1.py
Created September 7, 2023 11:45
MY solutions
print("hi")
@Professor-Sathish
Professor-Sathish / greatestof2numbers.py
Created January 2, 2023 04:29
Greatest among two numbers without using if condition
#greatest among 2 numbers
number1=15 #assign number 1 value
number2=10 #assign number 2 value
print(f"Is this number1 is bigger ? - {number1>number2}") #display result
def qsort(s):
L=[v for v in s if v<s[0]] #s[0] is pivot
G=[v for v in s if v>s[0]]
return L,G
def quicksort(s):
if len(s)<2:
return s
L,G=qsort(s)
return quicksort(L) + [v for v in s if v==s[0]] + quicksort(G)
#List ADT implementation
class ListADT:
def __init__(self):
self.items = []
def isEmpty(self):
return self.items == []
def add(self, item):
self.items.append(item)
def remove(self, item):
self.items.remove(item)
@Professor-Sathish
Professor-Sathish / ADT2.py
Created April 10, 2022 16:39
Exploring ADTs via Python Snippets - Abstract Class
#Abstract classes may not be instantiated
class A:#Abstract Class
def __init__(self,stuname):
self.collegename="kite"
self.stuname=stuname
class B(A):
def display(self):
print(f"college name {self.collegename}")
print(f"student name {self.stuname}")
ins=B("raja")
@Professor-Sathish
Professor-Sathish / ADT1.py
Created April 10, 2022 16:36
Exploring ADTs via Python Snippets - ADTs and Datatypes
#Physical view of Data type
n1=10
print(f"value of n1 {n1}")
#Logical view of Data type
print(f"type of n1 {type(n1)}")
#ADTs - Only logical view
import random
#we dont know the code of random module
print(random.randint(12,45))