Program:01
Title:write a program to sort a list of N elements using selection sort technique
Name:Manya
Class:3rd B.C.A
Date:19-08-2005
Program:02
Title:write a program to sort a list of N elements using selection sort technique
Name:Manya
Class:3rd B.C.A
Date:19-08-2005
Program:03
Title:write a program to sort a list of N elements using selection sort technique
Name:Manya
Class:3rd B.C.A
Date:19-08-2005
>>> def chatbot():
While True:
Text = input("You:")lower()
if "hello"in text:
print("AI:Hi there!")
elif"bye"in text:
print("AI,Good bye!")
break
else:
print("AI:I don't understand:")
Chat bot()
Program:04
Title:write a program to sort a list of N elements using selection sort technique
Name:Manya
Class:3rd B.C.A
Date:19-08-2005
from queue import Queue
def bfs(graph , start , gaol):
visited=set()
queue=Queue()
[Link] ([start]) # start with a path containing only the start node
while not [Link]():
path=[Link]() # Get the current path
node=path[-1] #Get the last node in the path
if node == goal:
return path # Return the path if goal is reached
if node not in visited:
visited .add(node) # Mark the node as visited
for neighbor in [Link](node,[1]):# Iterate over neighbors
new_path= List (path) # copy the current path
new_path.append(neighbor) # Append the new node
[Link] (new_path) # Add new path to the queue
return None # If no path is found