Miscellaneous Python Assignments
Write a Python program to calculate the sum of all the numbers in a given list.
Write a Python program to check if a given string is a palindrome.
Write a Python program to find the largest and smallest number in a given list.
Write a Python program to find the factorial of a given number.
Write a Python program to find the second largest number in a given list.
Write a Python program to check if a given number is prime or not.
Write a Python program to reverse a given string.
Write a Python program to find the length of the longest consecutive sequence of a given list of integers.
Write a Python program to check if a given number is Armstrong number or not.
Write a Python program to find the common elements between two lists.
Write a Python program to sort a given list of integers in ascending order.
Write a Python program to count the frequency of each element in a given list.
Write a Python program to find the sum of digits of a given number.
Write a Python program to check if a given string contains only alphabets.
Write a Python program to find the intersection of two given lists.
Write a Python program to find the GCD (Greatest Common Divisor) of two given numbers.
Write a Python program to check if a given year is a leap year or not.
Write a Python program to find the sum of all even numbers in a given list.
Write a Python program to find the third largest number in a given list.
Write a Python program to convert a given list of strings to a dictionary where the strings are keys and their lengths are values.
Write a Python program to find the median of a given list of numbers.
Write a Python program to check if a given number is a perfect square or not.
Write a Python program to find the sum of all prime numbers in a given range.
Write a Python program to remove duplicates from a given list.
Write a Python program to find the largest palindrome number made from the product of two 3-digit numbers.
Write a Python program to find the sum of all odd numbers in a given list.
Write a Python program to check if a given string is an anagram of another string.
Write a Python program to find the sum of all the multiples of 3 or 5 below a given number.
Write a Python program to check if a given number is a perfect number or not.
Write a Python program to find the number of vowels and consonants in a given string.
Write a Python program to sort a given list of strings based on their lengths.
Write a Python program to find the sum of all elements in a given 2D list.
Write a Python program to check if a given number is a perfect power of 2 or not.
Write a Python program to find the second smallest element in a given list.
Write a Python program to find the number of occurrences of a given element in a given list.
Write a Python program to reverse the words in a given sentence.
Write a Python program to find the common elements among multiple lists.
Write a Python program to convert a given list of integers into its corresponding binary representation.
Write a Python program to check if a given string is a valid palindrome ignoring spaces and punctuation.
Write a Python program to find the sum of all elements in a given array.
Write a Python program to find the greatest common divisor (GCD) of three given numbers.
Write a Python program to sort a given list of tuples based on the second element in each tuple.
Write a Python program to find the sum of all odd-indexed elements in a given list.
Write a Python program to count the number of digits in a given number.
Write a Python program to find the largest sum of contiguous subarray in a given list of integers.
Write a Python program to check if a given string is a valid email address or not.
Write a Python program to find the smallest missing positive number in a given list.
Write a Python program to find the largest prime factor of a given number.
Write a Python program to find the sum of all elements in a given dictionary.
Write a Python program to check if a given string is a pangram or not.
Write a Python program to find the length of the longest common prefix in a given list of strings.
Write a Python program to find the number of trailing zeros in the factorial of a given number.
Write a Python program to check if a given number is a palindrome or not.
Write a Python program to implement the insertion sort algorithm on a given list of integers.
Write a Python program to find the maximum difference between any two elements in a given list.
Write a Python program to check if a given string is a valid IPv4 address or not.
Last updated