Python Machine Test - Arrays, Lists, Strings &
Logic Questions
1. Find the largest element in a list without using max().
2. Find the smallest element in a list without using min().
3. Find the second largest element in a list without using sort().
4. Find the sum of all elements in a list.
5. Count the number of even elements in a list.
6. Count the number of odd elements in a list.
7. Reverse a list without using reverse() or slicing.
8. Remove duplicate elements from a list without using set().
9. Find the frequency of each element in a list.
10. Find the common elements between two lists.
11. Merge two lists and remove duplicates.
12. Move all zeros to the end of a list.
13. Find the missing number in an array containing numbers from 1 to n.
14. Find the maximum occurring element in a list.
15. Check whether a list is sorted in ascending order.
16. Rotate a list by k positions without using slicing.
17. Separate even and odd numbers from a list.
18. Find all duplicate elements in a list.
19. Find the intersection of two lists.
20. Implement Bubble Sort without using sort().
21. Check whether a string is a palindrome without using slicing.
22. Count the vowels in a string.
23. Find the first non-repeating character in a string.
24. Check whether two strings are anagrams without using sorted().
25. Generate the Fibonacci series up to n terms.
26. Check whether a number is an Armstrong number.
27. Check whether a number is a prime number.
28. Find the factorial of a number without using recursion.
29. Print a pyramid star pattern for n rows.
30. Write a menu-driven program that performs insert, delete, search, and display operations on a
list.