Lab Solutions for the course "Artificial Intelligence" at the University of the Punjab, Lahore. - DC-324-3
- Task 1: Print Function
- Task 2: Input Function with Variables
- Task 3: Print in Multiple Lines
- Task 4: if-else Statement
- Task 5: Data Types - Integers, Floats
- Task 6: Data Types - Boolean
- Task 7: Data Types - Strings
- Task 8: Data Types - Escape Sequences
- Task 9: Data Types - String as Array of Characters
- Task 10: Data Types - Lists
- Task 11: Data Types - List Slicing
- Task 1: Iterative Statements - While loop
- Task 2: Iterative Statements - While loop in single line
- Task 3: Iterative Statements - For in loop over a list, tuple, string
- Task 4: Iterative Statements - For in loop by index of sequences
- Task 5: Loop Control Statements - Continue
- Task 6: Loop Control Statements - Break
- Task 7: Functions - Defining a function
- Task 8: Functions - Calling a function
- Task 9: Functions - Function with arguments
- Task 10: Functions - Function with list as argument
- Task 11: Functions - Function with return value
- Task 12: Functions - Function with keyword arguments
- Task 13: Classes - Defining a class
- Task 14: Classes - Creating an object of a class
- Task 15: Classes - Class with constructor/initializer
- Task 16: Classes - Class with methods
- Task 1: Find those numbers which are divisible by 7 and multiple of 5, between 1500 and 2700 (both included).
- Task 2: Convert temperatures to and from Celsius, Fahrenheit.
- Task 3: Guess a number game 1 to 9.
- Task 4: Print Asterisk pattern.
- Task 5: Reverse a word.
- Task 6: Count even and odd numbers in a list.
- Task 7: Print type of elements in a list.
- Task 8: Print All numbers from 0 to 6 except 3 and 6.
- Task 9: Get the Fibonacci series between 0 to 50.
- Task 10: Print text for mutiples of 3, 5, 3 and 5.
- Task 11: Create Two dimentional array.
- Task 12: Input sequence of lines and terminate on empty line with output in lower case.
- Task 13: Accepting a sequence of comma-separated binary numbers from console and check if they are divisible by 5.
- Task 14: Accept a String and calculate the number of digits and letters.
- Task 15: Check the validity of password input by the user.
- Task 1: Implement Stack using Class
- Task 2: Implement Queue using Class
- Task 3: Implement Binary Search/Half-Interval Search Algorithm
- Task 1: Implement Breadth First Search Algorithm
- Task 2: Implement Breadth First Search Algorithm Using Queue on a Graph
- Task 3: Implement Priority Queue using Heap
- Task 1: Implement Depth First Search Algorithm
- Task 2: Implement Depth First Search Algorithm Using Stack on a Graph