Posts

Showing posts from July, 2018

Artificial Intelligence Programs For Programming in Python

Traveling Salesman Problem ( TSP )] Artificial Intelligence Programs For Master Leval Programming in Python from iter tools import permutations def distance(point1, point2): >>> distance([3,4],[0,0]) 5.0 >>> distance([3,6],[10,6]) 7.0 return ((point1[0] - point2[0])**2 + (point1[1] - point2[1])**2) ** 0.5 def total_distance(points): all the points are in the given order. >>> total_distance([[1,2],[4,6]]) 5.0 >>> total_distance([[3,6],[7,6],[12,6]]) 9.0 return sum([distance(point, points[index + 1]) for index, point in enumerate(points[:-1])]) def travelling_salesman(points, start=None): Time complexity is O(N!), so never use on long lists. >>> travelling_salesman([[0,0],[10,0],[6,0]]) ([0, 0], [6, 0], [10, 0]) >>> travelling_salesman([[0,0],[6,0],[2,3],[3,7],[0.5,9],[3,5],[9,1]]) ([0, 0], [6, 0], [9, 1], [2, 3], [3, 5], [3, 7], [0.5, 9]) """ if the start is None: start = points[0] return min([perm for perm ...

Search engine optimization questions answers-2

Image
Search Engine Optimizations (SEO)-2 Searching Techniques Fast Using SE Search engine optimization questions answers Google has started giving query refinement service from  answer:   2009     Sometimes google gives instant answers which are known as  answer: One box results If we enter SE1 2HG in google the output will be  answer:   Postcode of UK / google map of  UK Meaning of citation is.  answer:  To give reference   Use of meta keywords tag answer:  To define keywords of your site Use of meta description tag  answer:   To give detail description of the website Explain the meaning of the word semantic connectivity answer:   Related connectivity  Concept of link neighbourhood means ?  answer:   Links to related sites Full form of QDF is  answer:   Query deserves freshness From below which is not a positive ranking factor___ ...

MongoDB Exercises Practice Solution Exercise First

Image
MongoDB Exercises Practice Solution Exercise  Practice This All Examples Exercise 3 => Create database EMP and Make Collection With name "EMPL" and Follow Queries  =>Created Database > use emp switched to DB emp =>Create Collection > db.createCollection("empl") =>Insert Records Into EMPL Collection > db.empl.insert([ {no:1,name:"ST",salary:2000,role:"OB"}, {no:2,name:"MSD",salary:1500,role:"WK"}, {no:3,name:"YS",salary:1000,role:"ALR"}, {no:4,name:"RD",salary:1000,role:"MOB"}, {no:5,name:"RS",salary:500,role:"OB"}, {no:6,name:"BK",salary:500,role:"MOB"}, {no:7,name:"VK",salary:300,role:"BW"}, {no:8,name:"JB",salary:400,role:"BW"}, {no:9,name:"HP",salary:400,role:"ALR"}, {no:10,name:"VS",salary:300,role:"OB"...

Search engine optimization questions answers

Image
Search Engine Optimizations (SEO) Searching Techniques Fast Using SE 1)       Full form of SEO is? answer: Search Engine Optimization        2)         Full form of SEM is? answer: Search Engine Marketing   3)       Full form of SMM is? answer:  Social Media Marketing   4)       Full form of SERP is? answer:  Search Engine Result Pages  5)       Which Search engine has the highest market share in China? answer:  Baidu  6)       Full form of PPC is? answer:  Pay Per Click  7)       Which of below is not a type of query? answer:  Searching  8)       Average length in the number of words is _______ according to one survey conducted by ComScore in 2...