Here are categorized prompts for coding practice, suitable for beginner to advanced levels:
Beginner Level
-
Write a program that prints the Fibonacci sequence up to
nterms. -
Create a function to check if a string is a palindrome.
-
Develop a simple calculator that can add, subtract, multiply, and divide two numbers.
-
Implement a program to find the largest and smallest number in a list.
-
Write a function to count the number of vowels and consonants in a string.
-
Build a number guessing game using loops and conditionals.
-
Create a program to reverse a list without using built-in functions.
-
Implement a basic to-do list manager using a Python dictionary or list.
-
Write a function that takes a year and returns whether it is a leap year.
-
Simulate rolling a dice and print the outcome.
Intermediate Level
-
Build a function to validate an email address format.
-
Write a program to sort a list of tuples based on the second element.
-
Implement a binary search algorithm.
-
Create a text-based rock-paper-scissors game.
-
Write a program to detect duplicate elements in a list.
-
Build a command-line contact manager (add, delete, update contacts).
-
Create a function that returns the factorial of a number using recursion.
-
Develop a program that converts Roman numerals to integers.
-
Write a script to count the frequency of each word in a text file.
-
Implement a matrix transpose function.
Advanced Level
-
Build a simple web scraper that extracts headlines from a news website.
-
Implement a basic CRUD (Create, Read, Update, Delete) API using Flask or FastAPI.
-
Create a chatbot using a rule-based logic or simple NLP techniques.
-
Develop a program to solve Sudoku puzzles.
-
Write a program that implements Dijkstra’s shortest path algorithm.
-
Build a mini file encryption and decryption tool using Python’s
cryptographylibrary. -
Implement a real-time chat application using sockets.
-
Create a system to track and visualize expenses with data stored in SQLite.
-
Write a multithreaded downloader for large files.
-
Develop a basic recommendation engine using cosine similarity.
Would you like prompts tailored to a specific language, technology stack, or use case (e.g., web development, data science, algorithms)?