Posts

Showing posts with the label Python

K Nearest Neighbors (KNN) > Python Program

K Nearest Neighbors (KNN) > Python Program Machine Learning knn.py from numpy import * import operator def createDataSet():     group = array([[1.0,1.1],[1.0,1.0],[0,0],[0,0.1]])     labels = ['A','A','B','B']     return group, labels

To perform uninformed search using DFS Traversal > Python Program

To perform uninformed search using DFS Traversal > Python Program Artificial Intelligence Program: graph={'A':['B','C'],'B':['A','D','E'],'C':['A','E'],'D':['B','E'],'E':['D','B','C']}

To perform uninformed search using BFS Traversal > Python Program

To perform uninformed search using  BFS Traversal > Python Program Artificial Intelligence Program: graph={'A':['B','C'],'B':['A','D','E'],'C':['A','E'],'D':['B','E'],'E':['D','B','C']}

To solve Tower of Hanoi > Python Program

To solve Tower of Hanoi > Python Program Artificial Intelligence Program: #function of tower of hanoi

To find average of 2 Numbers > Python Program

To find average of Numbers > Python Program Artificial Intelligence # Function to make average of 2 nos

To add numbers using function > Python Program

To add numbers using functions > Python Program Artificial Intelligence Program: #function to add two nos