0% found this document useful (0 votes)
3 views2 pages

Python Machine Test Array List Questions-1

The document outlines a series of Python machine test questions focusing on arrays, lists, strings, and logic problems. It includes tasks such as finding the largest and smallest elements in a list, counting even and odd numbers, and implementing sorting algorithms without built-in functions. Additionally, it covers string manipulations, number checks, and basic programming constructs like loops and conditionals.

Uploaded by

wixaco9705
Copyright
© All Rights Reserved
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% found this document useful (0 votes)
3 views2 pages

Python Machine Test Array List Questions-1

The document outlines a series of Python machine test questions focusing on arrays, lists, strings, and logic problems. It includes tasks such as finding the largest and smallest elements in a list, counting even and odd numbers, and implementing sorting algorithms without built-in functions. Additionally, it covers string manipulations, number checks, and basic programming constructs like loops and conditionals.

Uploaded by

wixaco9705
Copyright
© All Rights Reserved
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

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.

You might also like