Login
Order Now
Support
Python Solution for Search and Data Mining Task

Python Solution for Search and Data Mining Task

  • 17th Nov, 2022
  • 16:40 PM

lst = {"fruit":"apple","mac":"apple"}
print(lst)
pers = input('select your persionalisation:Ex-computer Engineering ')
key=""
if pers=="computer Engineering":
    for y in lst.keys():
      if ( y=="mac"): #set keys for computer engineering
         key = y
    n = input('please Enter value to be search : ' )
    for x in lst.values():
       if ( x==n):
          print("your search results here ",key)    
else :
   print("please select personalisation")

********************************************************************

pos =-1  # make global variable
def search(list , n):
    i=0
    while i<len(list):
        if list [i]==n:
          globals()['pos']=i
          return True
        i=i+1
    return False
list = [5,'#latest',4,6,9,2]
n='#latest'
if search(list,n):
    print(n ," :" ," Founds at index in the list",pos+1)
else:
    print (n ," :" ," Not Found in list data")
 

Share this post

assignment helpassignment helperassignment expertsassignment writing services