Assignment 1 Problem – Write a program to find out the next state of a given 8-puzzle problem. Solution : import heapq # Define the goal state goal_state = [[1, 2, 3], [4, 5, 6], [7, 8, 0]] # Define the possible moves moves = [(0, 1), (0, -1), (1, 0), (-1, 0)] def heuristic(state): # Manhattan distance heuristic distance = 0 for i in range(3): for j in range(3): if state[i][j] != 0: goal_row, goal_col = (state[i][j] - 1) // 3, (state[i][j] - 1) % 3 ...
Prolog Clause Prolog programs describe relations, defined by means of clauses. Pure Prolog is restricted to Horn clauses. There are two types of clauses: facts and rules. A rule is of the form Head :- Body and is read as "Head is true if Body is true". For example animal (X) :- cat (X). mean for all X, X animal if X is cat. Fact is a clause without body. For example ‘Tom is a cat.’ is a fact and represented in prolog as cat (‘ Tom’ ). It may also be represented as cat ( tom ):- true. Term A term in prolog may be Atom: An atom is a general-purpose name with no inherent meaning. Examples of atoms include x , red , 'Taco' , 'some atom’ . Number : It can be floats or in...
Now a days every one of you know that we are giving GST on every products. NOW HERE A QUESTION ARISE WHAT IS GST Goods and Service Tax ( GST ) is an indirect tax (or consumption tax ) levied in India on the supply of goods and services. GST is levied at every step in the production process, but is refunded to all parties in the chain of production other than the final consumer. The tax came into effect from July 1, 2017 through the implementation of One Hundred and First Amendment of the Constitution of India by the Indian government . The tax replaced existing multiple cascading taxes levied by the central and state governments. The tax rates, rules and regulations are governed by the GST Council which comprises finance ministers of centre and all the states...
Comments
Post a Comment
Kaushikmadhav77@gmail.com