Sunday, 19 March 2023
Here are 50 common Python interview programs:
In this post, we have given the interview questions at the very beginner level.
Write a program to print "Hello, World!".
Write a program to swap two variables.
Write a program to find the largest number among three numbers.
Write a program to check whether a number is even or odd.
Write a program to find the sum of natural numbers up to a given number.
Write a program to find the factorial of a number.
Write a program to check whether a given string is a palindrome or not.
Write a program to count the number of vowels in a given string.
Write a program to reverse a string.
Write a program to check whether a given number is a prime number or not.
Write a program to find the Fibonacci series up to a given number.
Write a program to find the GCD of two numbers.
Write a program to find the LCM of two numbers.
Write a program to convert Celsius to Fahrenheit.
Write a program to convert Fahrenheit to Celsius.
Write a program to find the roots of a quadratic equation.
Write a program to find the area of a circle.
Write a program to find the area of a triangle.
Write a program to find the perimeter of a rectangle.
Write a program to find the perimeter of a square.
Write a program to find the area of a rectangle.
Write a program to find the area of a square.
Write a program to find the sum of digits of a given number.
Write a program to find the number of digits in a given number.
Write a program to check whether a given number is a palindrome or not.
Write a program to find the ASCII value of a character.
Write a program to find the HCF of two numbers.
Write a program to find the sum of the digits of a given number until the sum becomes a single digit.
Write a program to find the sum of even and odd numbers in a given list.
Write a program to find the maximum and minimum elements in a given list.
Write a program to remove duplicates from a given list.
Write a program to sort a given list in ascending and descending order.
Write a program to find the second largest element in a given list.
Write a program to find the second smallest element in a given list.
Write a program to reverse a given list.
Write a program to find the sum of all numbers in a given list.
Write a program to find the average of all numbers in a given list.
Write a program to find the median of all numbers in a given list.
Write a program to find the mode of all numbers in a given list.
Write a program to find the frequency of each element in a given list.
Write a program to find the common elements between two given lists.
Write a program to merge two given lists and remove duplicates.
Write a program to count the number of occurrences of a given element in a given list.
Write a program to find the intersection of two given lists.
Write a program to find the union of two given lists.
Write a program to find the difference between two given lists.
Write a program to remove the nth element from a given list.
Write a program to find the sum of elements in the diagonal of a matrix.
Write a program to find the transpose of a matrix.
Write a program to multiply two matrices.
No comments :
Post a Comment