10 Simple Python Projects with Code
Why Projects Accelerate Your Career
Are you planning to move into Data Science or AI but unsure where to start? You’re not alone. Many professionals and students hesitate because they only learn Python without actually building something with it.
Simple Python mini projects bridge this gap. They show you can solve problems, not just write syntax. Whether you’re preparing for interviews or building a GitHub portfolio, these projects will help you stand out.
1. Currency Converter (Beginner)
Converts US Dollars into Indian Rupees using a fixed exchange rate (or can be extended to use live APIs). A great starting project to learn input, output, and arithmetic operations.
Code Example
amount = float(input("Enter amount in USD: "))
exchange_rate = 82.5 # Static example, can replace with API
inr = amount * exchange_rate
print(f"${amount} is ₹{round(inr, 2)}")
Code Explanation
- float(input()) → takes user input and converts it to a decimal number.
- exchange_rate → static conversion value (can be updated from an API).
- round() → formats the result to 2 decimal places for neat display.
Takeaway: You learn how to take input, perform calculations, and print results, all core Python concepts.
2. Password Generator (Beginner)
Generates strong passwords using random characters, essential for learning about Python’s built-in libraries.
Code Example
import random
import string
length = int(input("Enter password length: "))
chars = string.ascii_letters + string.digits + string.punctuation
password = ''.join(random.choice(chars) for _ in range(length))
print("Generated Password:", password)
Code Explanation
- string.ascii_letters → all uppercase and lowercase letters.
- string.digits → numbers 0–9.
- string.punctuation → symbols for stronger passwords.
- random.choice(chars) → selects a random character from the combined string.
- ”.join() → joins characters into a single password string.
Takeaway: You’ll understand how to combine libraries and loops to automate a real-world task.
3. Weather App using API (Intermediate)
Takes a city name and fetches weather details using OpenWeather API. Great for learning HTTP requests and JSON parsing.
Code Example
import requests
city = input("Enter city name: ")
url = f"https://api.openweathermap.org/data/2.5/weather?q={city}&appid=YOUR_API_KEY"
response = requests.get(url)
data = response.json()
print(f"Weather in {city}: {data['weather'][0]['description']}")
Code Explanation
- requests.get(url) → makes an HTTP call to the API.
- .json() → converts API response into a Python dictionary.
- data[‘weather’][0][‘description’] → extracts weather condition text.
Takeaway: You learn API integration critical for Data Engineers and Analysts who work with real-time data.
4. Personal Expense Tracker (Intermediate)
Tracks daily expenses and outputs the total, helping you learn data structures like dictionaries.
Code Example
expenses = {}
while True:
item = input("Enter item (or 'stop'): ")
if item.lower() == 'stop':
break
cost = float(input("Enter cost: "))
expenses[item] = cost
total = sum(expenses.values())
print("Total Expenses:", total)
Code Explanation
- expenses = {} → initializes an empty dictionary.
- item.lower() == ‘stop’ → stops loop when user types “stop”.
- sum(expenses.values()) → calculates the total from dictionary values.
Takeaway: This project solidifies your understanding of loops, dictionaries, and aggregations.
5. Data Cleaning Script (Data Science Focus)
Cleans messy CSV data using Pandas, perfect for beginners entering Data Science.
Code Example
import pandas as pd
df = pd.read_csv("raw_data.csv")
df = df.dropna() # Remove missing rows
df['Amount'] = df['Amount'].astype(float) # Ensure correct type
df.to_csv("clean_data.csv", index=False)
print("Data cleaned successfully!")
Code Explanation
- pd.read_csv() → loads CSV data into a DataFrame.
- dropna() → removes rows with missing values.
- astype(float) → converts column values to numeric.
- to_csv() → saves the cleaned data back to disk.
Takeaway: You learn core data wrangling, which is a must-have for any Data Science role.
6. To-Do List with File Storage (Intermediate)
Adds tasks and saves them to a file, helping you practice file handling.
Code Example
tasks = []
while True:
task = input("Add task (or 'done'): ")
if task.lower() == 'done':
break
tasks.append(task)
with open("tasks.txt", "w") as f:
for t in tasks:
f.write(t + "\n")
print("Tasks saved to tasks.txt")
Code Explanation
- with open(“tasks.txt”, “w”) → opens a file for writing.
- f.write() → writes each task on a new line.
- Using with automatically closes the file.
Takeaway: File persistence is crucial for building tools that store data locally.
7. Chatbot using if-else Logic (Beginner)
A basic chatbot that responds to keywords.
Code Example
while True:
user = input("You: ")
if "hi" in user.lower():
print("Bot: Hello there!")
elif "bye" in user.lower():
print("Bot: Goodbye!")
break
else:
print("Bot: I didn't understand that.")
Code Explanation
- Simple conditionals check for keywords.
- The chatbot loops until “bye” is typed.
Takeaway: Great for beginners to learn how to handle user input interactively.
8. Stock Price Tracker (Intermediate)
Fetches stock price data using the yfinance library.
Code Example
import yfinance as yf
ticker = input("Enter stock ticker: ")
stock = yf.Ticker(ticker)
print(stock.history(period="1d"))
Code Explanation
- yf.Ticker() → gets a stock object.
- .history() → fetches recent stock data.
Takeaway: You practice using external Python libraries for financial analytics.
9. Image Resizer (Practical)
Resizes images with the Pillow library, useful for automation scripts.
Code Example
from PIL import Image
img = Image.open("photo.jpg")
img = img.resize((300, 300))
img.save("photo_resized.jpg")
print("Image resized successfully!")
Code Explanation
- Image.open() → loads an image file.
- .resize() → changes dimensions.
- .save() → writes to a new file.
Takeaway: You learn how to manipulate files beyond text and numbers.
10. Web Scraper for Headlines (Intermediate)
Scrapes news headlines using BeautifulSoup.
Code Example
import requests
from bs4 import BeautifulSoup
url = "https://news.ycombinator.com/"
res = requests.get(url)
soup = BeautifulSoup(res.text, 'html.parser')
for link in soup.select('.titleline a')[:5]:
print(link.text)
Code Explanation
- requests.get() → fetches webpage content.
- BeautifulSoup() → parses HTML structure.
- .select() → locates elements using CSS selectors.
Takeaway: You understand how to collect structured data from websites, a skill highly valued in analytics.
Conclusion: Turn Simple Python Projects into a Data Science Career
Working on simple Python projects proves you can apply programming to solve real problems. Whether it’s cleaning data, building a chatbot, or scraping websites, these mini projects strengthen your fundamentals and give you portfolio-ready examples.
For professionals or students aiming to transition into Data Science, Analytics, or AI, this is a solid start. To move beyond the basics, structured learning and practical guidance can turn these projects into real career opportunities.
Summary Table of Python Mini Projects
Project Name | Key Concept | Skill Level |
---|---|---|
Currency Converter | Input/Output, math | Beginner |
Password Generator | Strings, randomization | Beginner |
Weather App | APIs, JSON parsing | Intermediate |
Expense Tracker | Dictionaries, loops | Intermediate |
Data Cleaning Script | Pandas, data wrangling | Data Science |
To-Do List | File handling | Intermediate |
Chatbot (if-else) | Logic, interaction | Beginner |
Stock Price Tracker | APIs, finance libraries | Intermediate |
Image Resizer | External modules | Practical |
Web Scraper | BeautifulSoup, parsing | Intermediate |
FAQs
A currency converter or password generator is easy to start with and covers basic syntax.
They prove you can apply Python concepts to real problems recruiters often ask for such examples.
Not at all. Start with basic Python projects, then move to libraries like Pandas, NumPy, and Scikit-learn.

Master Data Science While Working | Best Data Science Course
Master data science without quitting your job. Discover practical strategies, real-world projects, and expert tips to balance work and learning. Explore the best data science classes and find the right data science course to grow your career in data science.

Enter the Data Science Field with No Prior Experience
Thinking about a career switch? This blog explains how to transition into data science step by step. Explore a beginner-friendly data science course and a practical data science course syllabus that covers Python, SQL, machine learning, and portfolio-building to help you land your first role.