A Collection of Python Interview Questions and Code
Python Programming Coding Questions on Numbers Q1). Write a program to reverse an integer in Python Q2). Write a program in Python to check whether an integer is Armstrong number or not. (COMPLETED) Q3). Write a program in Python to check given number is prime or not. (COMPLETED) Q4). Write a program in Python to print the Fibonacci series using iterative method. Q5). Write a program in Python to print the fibonacci series using recursive method. Q6). Write a program in Python to check whether a number is palindrome or not using iterative method. Q7). Write a program in Python to check whether a number is palindrom or not using recursive method. Q8). Write a program in Python to find greatest among three integers. Q9). Write a program in Python to check if a number is binary? Q10). Write a program in Python to find sum of digits of a number using recursion? Q11). Write a program in Python to swap two numbers without using third variable? Q12). Write a program in Python to swap two numbers using third variable? Q13). Write a program in Python to find prime factors of a given integer. Q14). Write a program in Python to add two integer without using arithmetic operator? Q15). Write a program in Python to find given number is perfect or not?
Python Programming Coding Questions on String Q1). Write a method in Python which will remove any given character from a String. Q2). Write a program in Python to count occurrence of a given character in a String? Q3). Write a program in Python to check if two String are Anagram. Q4). Write a program in Python to check a String is palindrome or not.
Python Programming Coding Questions on Array Q1). Write a program in Python for, In array 1-100 numbers are stored, one number is missing how do you find it. Q2). Write a program in Python for, In a array 1-100 multiple numbers are duplicates, how do you find it. Q3). Write a program in Python for, How to find all pairs in array of integers whose sum is equal to given number. Q4). Write a program in Python for, How to compare two array is equal in size or not. Q5). Write a program in Python to find largest and smallest number in array. Q6). Write a program in Python to find second highest number in an integer array. Q7). Write a program in Python to find top two maximum number in array? Q8). Write a program in Python to remove duplicate elements form array. (IN-PROGRESS)