0% found this document useful (0 votes)
259 views

Python Practice Problems List

This document provides a list of practice problems for Python interviews. It includes problems related to conditions and loops, lists, matrices, strings, dictionaries, and miscellaneous concepts. The document notes that the problems should not be shared or downloaded, and that built-in functions should not be used initially but explored later. It also encourages practicing in multiple languages and providing feedback about additional problems.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
259 views

Python Practice Problems List

This document provides a list of practice problems for Python interviews. It includes problems related to conditions and loops, lists, matrices, strings, dictionaries, and miscellaneous concepts. The document notes that the problems should not be shared or downloaded, and that built-in functions should not be used initially but explored later. It also encourages practicing in multiple languages and providing feedback about additional problems.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Python Practice Problems List

Most frequently asked interview programs in interviews of TCS / CTS /


Wipro / DXC / Infosys and in few service based companies.

Note :
1. Do not share the document with others.
2. Don’t download the document, refer from here, will be adding new
problems if it seems worth doing.
3. Don’t use inbuilt functions while practicing the problems. After the
completing program try to explore with inbuilt functions.
4. Don’t try to mug up the problems.
5. If you are comfortable in other programming languages also, try to
implement the same in that language also.
6. If you have asked about any new programs in an interview, please
do let me know, so that we can add the problem to the practice list.

Problems on conditions and loops:

1. Write a Program to Check if a Number is Positive, Negative or Zero


2. Write a Program to Check if a Number is Odd or Even
3. Write a Program to Check Leap Year
4. Write a program to differentiate whether the number is FIZZ/BIZZ/FIZZBUZZ.
a. FizzBuzz - Divisible by both 3 & 5
b. Fizz - Divisible by only 3
c. Buzz - Divisible by only 5
5. Write a Program to Check given number is prime number or not
6. Write a Program to Print all Prime Numbers until given number
7. Write a Program to Find the Factorial of a Number
8. Write a Program to Display the multiplication Table
9. Write a Program to Print the Fibonacci sequence
10. Write a Program to Check whether given number is Armstrong Number or not
11. Write a Program to Find Armstrong Number in an Interval
12. Write a Program to Find the Sum of ‘N’ natural numbers
13. Write a program to reverse a given number
a. Input : 3456
b. Output : 6543
14. Write a program to check whether a given number is palindrome or not.
15. Write a program to count the number of digits in given number
16. Write a program to print the sum of digits in a given number.

Problems on Lists:
1. Write a program to find the maximum number in a list
2. Write a program to find the minimum number in a list
3. Write a program to check whether targetsum is possible in a list or not
a. Input : [10,20,30,40], Targetsum = 60
b. In above 20+40 = 60
c. So, Print Possible
4. Write a program to print duplicate elements in a list.
a. Input : [1,2,3,4,5,5,6,]
b. Output: 5
5. Write a program to reverse a list.
a. Input : [10,20,30,40]
b. Output: [40,30,20,10]
6. Write a program to find the sum of all elements in the list.
7. Write a program to search a given element in a list.
a. Input : [10,20,30,40,50,15,20,5], SearchElement = 15
b. Yes, element found at index 5
8. Sort the given array using sorting algorithms (Refer Material)
9. WAP to find the how many times KeyElement repeated in List
Input : [10,20,10,10,20,30,40,50,60] KeyElement = 10
Output : 10 repeated for 3 times
Problems on Matrix:

1. Print sum of all elements in given matrix


2. Addition of two matrix which are same length
3. Subtraction of two matrix which are same length
4. Multiplication of two matrix which are same length

Problems on Strings:

1. How do you print duplicate characters from a string


2. How to check if two strings are anagrams or not.
3. How to check if the given string is palindrome or not.
4. Write a program to print the reverse of a given string.
5. Write a program to print the duplicate characters in the given string.
6. Write a program to count the number of vowels and consonants in the given string.
7. Write a program to print the most frequent letter in the given string.
8. Write a program to count the number of times a given character is repeated in string.

Problems on dictionaries:

1. Write a Program to create a dictionary


2. Write a Program to convert list to dictionary
3. Write a Program to sort a dictionary
4. Write a Program to Merge two Dictionaries

Problems on Miscessilous concepts :

1. Write a Program to Find LCM


2. Write a Program to Find HCF/GCD
3. Write a Program to Convert Decimal to Binary and vice versa
4. Write a Program To Find ASCII value of a character
5. Write a program to print the sum of ASCII values present in string.
6. Write a Program to Display Fibonacci Sequence Using Recursion
7. Write a Program to Find Factorial of Number Using Recursion

You might also like