Skip to content

Dev0psKing/Python-Code-Challenges

Repository files navigation

🐍 Python Coding Practice Problems 🚀

Welcome to my journey of solving 3000 Python problems!
Currently: 200+ problems solved 🎉 and counting daily.

This repo is organized to help anyone learning Python, preparing for coding interviews, or practicing problem-solving skills.

Progress Goal Python GitHub last commit GitHub repo size


📑 Table of Contents


📂 Structure

  • Simple → Basic syntax, logic, loops, functions, OOP
  • Topic-specific → Strings, Lists, Control Flow, etc.

Each folder contains:

  • Questions.md → problem list
  • Solutions.md → Python solutions with explanations

📌 Progress Tracker

Here’s my current progress (click links to view):


🎯 Goal

To build a public learning resource for programmers to practice Python and prepare for:

  • 💡 Coding interviews
  • 📘 Problem-solving skill building
  • 🏆 Competitive programming

🔥 Features

  • 200+ Python problems (growing daily)
  • Well-structured by topics
  • Detailed explanations for each solution
  • Beginner → Advanced difficulty

📊 Goals Updates


💻 Sample Problem

Here’s a taste of what you’ll find inside 👇

Problem: Reverse a string in Python.

# Solution: Reverse a string
def reverse_string(s: str) -> str:
    return s[::-1]

print(reverse_string("Python"))  # Output: nohtyP

Problem: Find all prime numbers up to n using the Sieve of Eratosthenes.

def sieve_of_eratosthenes(n: int) -> list[int]:
    """Return a list of prime numbers up to n."""
    if n < 2:
        return []

    primes = [True] * (n + 1)
    primes[0] = primes[1] = False

    for i in range(2, int(n**0.5) + 1):
        if primes[i]:
            for j in range(i*i, n + 1, i):
                primes[j] = False

    return [i for i, prime in enumerate(primes) if prime]

# Example usage
print(sieve_of_eratosthenes(50))
# Output: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages