Avasoft Written Test Preparation Pack
Section 1: Python Programming Practice (15 Problems)
   1. Write a Python program to check if a number is even or odd.
   2. Write a Python function to return the factorial of a number.
   3. Write a program to find the largest of three numbers.
   4. Reverse a string without using any built-in reverse functions.
   5. Write a program to count vowels in a given string.
   6. Write a function to check if a string is a palindrome.
   7. Find the sum of all elements in a list.
   8. Find the maximum and minimum element in a list.
   9. Write a program to print Fibonacci series up to n terms.
   10. Create a dictionary and print all its keys and values.
   11. Count the frequency of each character in a string using a dictionary.
   12. Find whether an element exists in a list or not.
   13. Use list comprehension to create a list of squares of even numbers from 1 to 10.
   14. Write a program to remove duplicates from a list.
   15. Write a Python function to find the GCD of two numbers.
Section 2: SQL Practice Questions (10 Problems)
   1. Write a SQL query to select all records from a table called Employees.
   2. Select the name and salary of employees whose salary is greater than 50000.
   3. Write a query to count the number of employees in each department.
   4. Write a query to retrieve all employees who joined between 2020 and 2023.
   5. Write a query to find the average salary in the company.
   6. Get all employee names who have 'Manager' in their job title.
   7. Write a query to display department-wise total salary spent.
   8. Perform an INNER JOIN between Employees and Departments on department_id.
   9. Write a query to fetch top 5 highest paid employees.
   10. Write a query to find employees whose department is not in (Sales, Marketing).
Section 3: AI/ML Theory Cheat Sheet
**AI (Artificial Intelligence)**: Simulation of human intelligence in machines.
**Machine Learning (ML)**: A subset of AI where machines learn from data.
**Supervised Learning**: Model is trained on labeled data (e.g., classification, regression).
**Unsupervised Learning**: Model finds hidden patterns in unlabeled data (e.g., clustering).
**Classification**: Predicting a category (e.g., spam or not spam).
**Regression**: Predicting a continuous value (e.g., price of a house).
**Overfitting**: Model performs well on training data but poorly on unseen data.
**Underfitting**: Model is too simple and performs poorly on both training and test data.
**Confusion Matrix**: Table used to evaluate the performance of a classification algorithm.
**Accuracy**: (TP + TN) / Total predictions.
**Precision**: TP / (TP + FP) – good for low false positives.
**Recall**: TP / (TP + FN) – good for low false negatives.
**Common Python Libraries**: pandas, numpy, matplotlib, scikit-learn.