CS-117: Applications of ICT
CHE18 (A&B) and ME18
Python Practice Problems
1. Write a program to check whether a year is a leap year or not.
2. Write a program to calculate the factorial of a number using a loop.
3. Write a program to print the multiplication table of a given number up to 10.
4. Write a program to check whether a given string is a palindrome.
5. Write a Python program to count vowels and consonants in a string.
6. Write a program to find the frequency of each character in a string.
7. Write a program to remove duplicate elements from a list.
8. Write a Python program to find the sum and average of elements in a list.
9. Write a program to read n numbers and display the count of positive, negative, and
zeros.
10. Write a Python program to input 20 positive integers from user and store them in a list.
Using a loop (without any function), find and display the sum of all prime numbers in
the list. Hint: A prime number is a number greater than 1 that has no divisors other than 1
and itself.