Python - Day 2 & 3 (1)
Python - Day 2 & 3 (1)
1. Factorial of a Number
Write a Python program to calculate the factorial of a given
number using recursion.
2. Fibonacci Sequence
Write a Python program to generate the Fibonacci sequence
up to a specified number of terms.
3. Palindrome Checker
Write a Python program to check if a given string is a
palindrome (reads the same backward as forward).
4. Prime Number Checker
Write a Python program to check if a given number is prime.
5. Reverse a String
Write a Python program to reverse a string without using any
built-in functions.
6. Count Vowels in a String
Write a Python program to count the number of vowels in a
given string.
7. Find the Largest Number in a List
Write a Python program to find the largest number in a list
without using the max() function.
8. Merge Two Dictionaries
Write a Python program to merge two dictionaries into one.
9. Check for Anagrams
Write a Python program to check if two strings are anagrams
of each other.
10. Binary Search
Write a Python program to implement binary search on a
sorted list.
Challenge Questions
1. Matrix Multiplication
Write a Python program to multiply two matrices.
2. Recursive Directory Listing
Write a Python program to list all files in a directory and its
subdirectories.
3. Web Scraping
Write a Python program to scrape the titles of the top 10
news articles from a news website (e.g., BBC News).
4. Data Analysis
Write a Python program to read a CSV file and calculate the
average of a specific column.
5. API Integration
Write a Python program to fetch weather data from a public
API (e.g., OpenWeatherMap) and display the current
temperature for a given city.