The document explains various programming concepts including compilers, interpreters, intelligent agents, fuzzy logic, flowcharts, and algorithms like A* and AO. It also covers Python built-in functions, control statements, operators, and applications of artificial intelligence, highlighting both advantages and disadvantages. Additionally, it discusses Python sets and indexing of lists.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
5 views1 page
Python?
The document explains various programming concepts including compilers, interpreters, intelligent agents, fuzzy logic, flowcharts, and algorithms like A* and AO. It also covers Python built-in functions, control statements, operators, and applications of artificial intelligence, highlighting both advantages and disadvantages. Additionally, it discusses Python sets and indexing of lists.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
Q.compiler–(i)translates the entire source code into machine Q.
explain intelligent agent-An intelligent agent is an
code(binary)at once, creating an executable file.(ii)Errors are autonomous entity which act upon an environment using identified and reported only after the entire code is sensors and actuators for achieving goals. An intelligent compiled.(iii)Programs run faster after compilation, as they agent may learn from the environment to achieve their goals. don't require the code to be translated each time they A thermostat is an example of an intelligent Agent. execute. Interpreter–(i)translates and executes code line by Q.explain fuzy logic-The 'Fuzzy' word means the things that line, rather than creating a separate executable file.(ii) Errors are not clear or are vague. Sometimes, we cannot decide in are identified line by line as the code executes, making real life that the given problem or statement is either true or debugging easier.(iii) programs run slower because false. At that time, this concept provides many values translation happens every time the code is executed between the true and false and gives the flexibility to find the . best solution to that problem. Q.flowchart is a diagramatic representation of sequence of Q.A* (pronounced "A-star") is a powerful graph traversal and logical steps of a program.flowcharts are simple geometric pathfinding algorithm widely used in artificial intelligence and shapes to depict processes and arrows to show relationships computer science. It is mainly used to find the shortest path and process/data flow. Flowchart symbols- some of the between two nodes in a graph, given the estimated cost of standard symbols alonge with respective function that are getting from the current node to the destination node. used for making flowchart are as follows: •start/stop-used at the beginning and end of the algorithm to Q.The AO algorithm* (short for “And-Or Star”) is a powerful show start and end of the program •process-indicates best-first search method used to solve problems that can be processes like mathematical operations •input/output-used for represented as a directed acyclic graph (DAG). This makes it denoting program inputs and outputs •decision-stands for more efficient for problems that involve AND-OR nodes. The decision statement in a program, where answer is usually yes AND nodes represent tasks where all child nodes must or no •arrow-shows relationship between different shapes •on besatisfied, while OR nodes offer multiple alternative paths page connector-connects two or more parts of a flowchart, where only onechild node needs to be satisfied to achieve the which are in the same page •off page connector- connects goal. two parts of a flowchart which are spread over different page Q.forward chaining-(i)When based on available data a decision is taken then the process is called as Forward Q.explain list built in function with desc6and examples. chaining.(ii)Forward chaining is known as data-driven -(1)cmp(list1,list2)-it compares the elements of both the technique because we reaches to the goal using the available lists-thus method is not used in the python 3 and the above data.(iii)It is a bottom-up approach.(iv)it applies the versions.(2)len(list)- it is used to calculate the length of the Breadth-First Strategy.(v)Its goal is to get the conclusion. list- L1=[1,2,3,4,5,6,7,8] Print(len(L1)) 8 Backward chaining-(i)Backward chaining starts from the goal (3)max(list)-it returns the maximum element of the list- and works backward to determine what facts must be L1=[12,33,26,48,72] print(max(L1)) 72 asserted so that the goal can be achieved.(ii)Backward (4)min(list)-it returns the minimum element of the list- chaining is known as goal-driven technique because we start L1=[12,34,26,48,72] Print(min(L1)) 12 from the goal and reaches the initial state in order to extract (5)list(seq)-it convert any sequence to the list-str=”Johnson” the facts.(iii)It is a top-down approach.(iv)It applies the s=list(str) Print(type(s)) <Class list> Depth-First Strategy.(V)Its goal is to get the possible facts or Q.explain control statement with description. the required data. -(1)break statement-this command terminates the loops execution and transfers the program control to the statement Q.Artificial intelligence-Artificial Intelligence is composed of next to the loop.(2) Continue statement-this command skips two words Artificial and Intelligence, where Artificial defines the current iteration of the loop. The statement following the "man-made," and intelligence defines "thinking power", hence continue statement are not executed once the python AI means "a man-made thinking power.” It is a branch of interpreter reaches the continue statement.(3)Pass computer science by which we can create intelligent statement-the pass statement is used when a statement is machines which can behave like a human, think like humans, syntactically necessary, but no code is to be executed. and able to make decisions. Artificial Intelligence exists when a machine can have human based skills such as learning, Q.expalin python operators with example. reasoning, and solving problems. -python provides a variety of operators,which are described Q.applications of AI-(i)AI in astronomy (ii)healthcare as follows: (iii)gaming (iv)entertainment (V)finance (vi)social media •Arithmetic operators •comparison operators •assignment (vii)agriculture (viii)education (ix)robotics ,and more. operators •bitwise operators •logical operators •identify Q.advatages of AI-•high accuracy with less errors. •High operators •membership operators (i) artithmetic operators are speed •high reliability •useful for risky areas •digital assistant used to perform arithmetic operations between two operands. •enhanced security •Aid in research Disadvantage of AI-•high Ex- +(addition), -(subtraction), *(multiplication), /(divide), cost •can't think out of the box •no feelings and emotions %(reminder), //(floore division), **(exponent) are operators. (ii) •increase dependency on machines •no original creativity. comparison operators are used to comparisinig the value of the two operands and returns Boolean true or false Q.python applications-(i)web applications (ii)desktop GUI accordingly. Ex- ==, !=, <=, >=, <, > (iii)the assignment applications (iii)console based applications (iv)software operator are used to assign the value of the right expression development (v)scientific and numeric (vi)business to the left operand. Ex- =, +=, -=, *=, **=, //= applications. Q.explain indexing of list– the indexing is processed in the Q.python sets-Sets in Python are unordered collections of same way as it happens with the strings. The elements of the unique elements. They are defined using curly braces {} or list can be accessed by using the slice operator[]. The index the set() function and are useful for storing distinct items and starts from 0 and goes to -1.the first element of the list is performing mathematical set operations like union, stored at the 0yh index, the second element of the list is intersection, and difference. stored at the 1st index, and so on. Ex-List[1,2,3,4,5,6,7]
Python Advanced Programming: The Guide to Learn Python Programming. Reference with Exercises and Samples About Dynamical Programming, Multithreading, Multiprocessing, Debugging, Testing and More