0% found this document useful (0 votes)
4 views3 pages

Top 100 Python Programming Aptitude Questions

The document lists the top 100 programming aptitude questions in Python, categorized into various topics such as Basics & Input/Output, Conditional & Loop Problems, Strings, Lists & Tuples, and more. Each category includes specific problems that test different programming skills, including file handling, object-oriented programming, and applied/tricky problems. This comprehensive guide serves as a resource for practicing Python programming and enhancing problem-solving abilities.

Uploaded by

mhys2827
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)
4 views3 pages

Top 100 Python Programming Aptitude Questions

The document lists the top 100 programming aptitude questions in Python, categorized into various topics such as Basics & Input/Output, Conditional & Loop Problems, Strings, Lists & Tuples, and more. Each category includes specific problems that test different programming skills, including file handling, object-oriented programming, and applied/tricky problems. This comprehensive guide serves as a resource for practicing Python programming and enhancing problem-solving abilities.

Uploaded by

mhys2827
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
You are on page 1/ 3

Top 100 Programming Aptitude Questions in

Python

1. Basics & Input/Output (10)


Print 'Hello World' without using quotes.
Swap two numbers without using a third variable.
Find the largest of three numbers.
Check if a number is even or odd.
Find ASCII value of a character.
Compute area and perimeter of a circle using radius.
Convert Celsius to Fahrenheit.
Find the factorial of a number.
Check leap year or not.
Reverse a number.

2. Conditional & Loop Problems (10)


Print all prime numbers between 1 and 100.
Find the sum of digits of a number.
Count the number of digits in a number.
Check if a number is palindrome.
Generate Fibonacci series up to N terms.
Find GCD and LCM of two numbers.
Print multiplication table of any number.
Count even and odd numbers in a list.
Check if a number is an Armstrong number.
Print patterns (like triangles, pyramids, etc.).

3. Strings (15)
Reverse a string.
Check if a string is palindrome.
Count vowels and consonants in a string.
Remove all spaces from a string.
Count frequency of each character in a string.
Find the longest word in a sentence.
Find the number of words in a string.
Convert string to uppercase and lowercase.
Replace a substring with another substring.
Check if two strings are anagrams.
Remove duplicates from a string.
Find common characters between two strings.
Find first non-repeating character in a string.
Check if a string contains only digits.
Implement your own split() and join() logic.

4. Lists & Tuples (15)


Find largest and smallest element in a list.
Find the sum and average of list elements.
Remove duplicates from a list.
Find the second largest number in a list.
Reverse a list without using reverse() or slicing.
Count occurrences of an element in a list.
Sort a list without using sort().
Merge two sorted lists.
Separate even and odd numbers from a list.
Find common elements between two lists.
Remove empty lists from a nested list.
Flatten a nested list.
Find the difference between two lists.
Rotate a list left/right by n positions.
Find sublist sum equal to a target.

5. Dictionaries & Sets (10)


Count frequency of words in a sentence using a dictionary.
Merge two dictionaries.
Sort a dictionary by value.
Remove a key from dictionary.
Find keys with maximum and minimum values.
Convert two lists into a dictionary.
Invert keys and values in a dictionary.
Check if two dictionaries are equal.
Find union and intersection of two sets.
Remove duplicates from a list using set.

6. Functions & Recursion (10)


Create a function to find factorial (recursive).
Fibonacci using recursion.
Sum of digits using recursion.
Reverse a string using recursion.
Find nth Fibonacci term using recursion.
Power of a number using recursion.
Check palindrome recursively.
Greatest Common Divisor using recursion.
Count digits recursively.
Find sum of natural numbers using recursion.

7. File Handling (5)


Read and write to a text file.
Count the number of lines, words, and characters in a file.
Copy contents of one file to another.
Remove blank lines from a file.
Find and replace words in a file.

8. Object-Oriented Programming (10)


Create a class Rectangle with area and perimeter methods.
Create a class BankAccount with deposit and withdraw methods.
Demonstrate inheritance using Employee and Manager.
Implement method overriding and overloading examples.
Implement a Student class with marks and grade calculation.
Create a class to represent Complex numbers.
Implement multiple inheritance in Python.
Use static and class methods.
Implement encapsulation (private variables).
Demonstrate constructor and destructor behavior.

9. Math, Logic & Patterns (10)


Find factorial without using loops.
Check if a number is strong number.
Find sum of first N prime numbers.
Print Pascal’s Triangle.
Print diamond/star pattern.
Find HCF and LCM.
Find perfect numbers between 1 and 1000.
Check Harshad number.
Print Armstrong numbers in range.
Generate random password using Python.

10. Applied/Tricky Problems (10)


Implement binary search.
Find missing number in a sequence.
Find pairs with sum equal to target.
Detect palindrome words in a sentence.
Implement basic calculator using functions.
Find unique elements in list.
Check if list is sorted.
Count number of prime digits in a number.
Implement bubble sort algorithm.
Find factorial of each number in a list.

You might also like