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

1 1-32problems

The document lists 35 problems related to writing Python programs. The problems cover a range of tasks like finding the sum and largest element in a list, checking if a number is prime or a year is a leap year, reversing strings, finding common elements between lists, and other tasks related to strings, numbers, permutations, and more.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

1 1-32problems

The document lists 35 problems related to writing Python programs. The problems cover a range of tasks like finding the sum and largest element in a list, checking if a number is prime or a year is a leap year, reversing strings, finding common elements between lists, and other tasks related to strings, numbers, permutations, and more.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

6/10/23, 11:33 AM 100 New Python Problems

100 New Python Problems

1. Write a Python program to find the sum of all elements in a list.


2. Write a Python program to calculate the factorial of a number.
3. Write a Python program to check if a given number is prime.
4. Write a Python program to reverse a string.
5. Write a Python program to find the largest element in a list.
6. Write a Python program to check if a string is a palindrome.
7. Write a Python program to count the number of vowels in a string.
8. Write a Python program to check if a given year is a leap year.
9. Write a Python program to find the common elements between two lists.
10. Write a Python program to check if a string is an anagram of another string.
11. Write a Python program to remove duplicates from a list.
12. Write a Python program to find the second largest number in a list.
13. Write a Python program to find the Fibonacci series up to a given number.
14. Write a Python program to check if a string is a valid email address.
15. Write a Python program to find the square root of a number.
16. Write a Python program to convert a string to uppercase.
17. Write a Python program to find the intersection of two lists.
18. Write a Python program to check if a number is a perfect square.
19. Write a Python program to check if a given string is a valid palindrome.
20. Write a Python program to calculate the area of a triangle.
21. Write a Python program to sort a list of strings in alphabetical order.
22. Write a Python program to find the prime factors of a number.
23. Write a Python program to check if a number is a Armstrong number.
24. Write a Python program to find the GCD (Greatest Common Divisor) of two numbers.
25. Write a Python program to count the number of words in a string.
26. Write a Python program to remove all whitespace characters from a string.
27. Write a Python program to find the length of the longest word in a string.
28. Write a Python program to find the sum of all even numbers in a list.
29. Write a Python program to check if a given string is a valid URL.
30. Write a Python program to generate all possible permutations of a list.
31. Write a Python program to find the third largest number in a list.
32. Write a Python program to find the LCM (Least Common Multiple) of two numbers.
33. Write a Python program to check if a given number is a perfect number.
Send a message.
34. Write a Python program to check if a given string is a valid IP address.
Free 35. Write
Research a Python
Preview. program
ChatGPT to reverse
may produce inaccuratethe order about
information of words inplaces,
people, a string.
or facts. ChatGPT May 24 Version

https://chat.openai.com/c/4152dd86-b53d-44a4-8a61-7b5406f8cab8 1/1

You might also like